[wp-trac] Re: [WordPress Trac] #4739: Some icelandic/Norwegian/Danish letters do not work in page slugs

WordPress Trac wp-trac at lists.automattic.com
Fri Feb 22 07:32:31 GMT 2008


#4739: Some icelandic/Norwegian/Danish letters do not work in page slugs
-------------------------------+--------------------------------------------
 Reporter:  einare             |        Owner:  westi   
     Type:  defect             |       Status:  reopened
 Priority:  high               |    Milestone:  2.6     
Component:  i18n               |      Version:  2.2.1   
 Severity:  major              |   Resolution:          
 Keywords:  needs-patch early  |  
-------------------------------+--------------------------------------------
Changes (by westi):

  * summary:  Some icelandic letters do not work in page slugs => Some
              icelandic/Norwegian/Danish letters do not work
              in page slugs
  * milestone:  2.5 => 2.6

Old description:

> When the page slug is generated from the post title, three icelandic
> letters are not converted correctly. These three letters are Ð ð, Þ þ and
> Æ æ. They should be converted to D d, TH th and AE ae but are not.
>
> For instance, when I made a post with the title ‘Þátturinn’ the post-slug
> would become ‘þatturinn’ and when I tried to enter that address in my
> address bar it changed to ‘%c3%beatturinn’ and I got a ‘page not found’
> error from Wordpress.
>
> This can be fixed by adding the following six lines to formatting.txt, in
> the function remove_accents, inside the '''if (seems_utf8($string)) {'''
> condition.
>
> {{{
> chr(195).chr(144) => 'D',
> chr(195).chr(176) => 'd',
> chr(195).chr(158) => 'TH',
> chr(195).chr(190) => 'th',
> chr(195).chr(134) => 'AE',
> chr(195).chr(166) => 'ae',
> }}}

New description:

 When the page slug is generated from the post title, three icelandic
 letters are not converted correctly. These three letters are Ð ð, Þ þ and
 Æ æ. They should be converted to D d, TH th and AE ae but are not.

 For instance, when I made a post with the title ‘Þátturinn’ the post-slug
 would become ‘þatturinn’ and when I tried to enter that address in my
 address bar it changed to ‘%c3%beatturinn’ and I got a ‘page not found’
 error from Wordpress.

 This can be fixed by adding the following six lines to formatting.txt, in
 the function remove_accents, inside the '''if (seems_utf8($string)) {'''
 condition.

 {{{
 chr(195).chr(144) => 'D',
 chr(195).chr(176) => 'd',
 chr(195).chr(158) => 'TH',
 chr(195).chr(190) => 'th',
 chr(195).chr(134) => 'AE',
 chr(195).chr(166) => 'ae',
 }}}

 Also (from #5952)
 When the post slug is generated from the post title, the letter 'Å' 'å'
 converts to 'a', should convert to 'aa' which is the general practice in
 countries using this character (Confer
 [http://en.wikipedia.org/wiki/%C3%85#Transcription Wikipedia]).

 Furthermore, the Norwegian/Danish characters 'Æ' 'æ' and 'Ø' 'ø' should be
 converted to respectively 'ae' and 'oe'. As of now, these convert to
 '%c3%a6' and '%c3%b8'.

Comment:

 Closed #5952 as a dupe of this and updated bug with more characters to
 fix.

 Moving to 2.6 as this needs fixing early and lots of testing so we can be
 sure we don't break things.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4739#comment:13>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list