[wp-trac] [WordPress Trac] #10298: Error in /wp-admin/ when using danish characters (æøå) in domain names

WordPress Trac wp-trac at lists.automattic.com
Mon Dec 28 00:58:44 UTC 2009


#10298: Error in /wp-admin/ when using danish characters (æøå) in domain names
--------------------------+-------------------------------------------------
 Reporter:  kjeldsen      |        Owner:  markjaquith   
     Type:  defect (bug)  |       Status:  closed        
 Priority:  normal        |    Milestone:  Future Release
Component:  Canonical     |      Version:  2.8           
 Severity:  normal        |   Resolution:  worksforme    
 Keywords:  has-patch     |  
--------------------------+-------------------------------------------------

Comment(by hakre):

 Replying to [comment:8 dwright]:
 > As I mentioned in bug #10690, I believe Wordpress should be an IDNA-
 enabled application.
 Shure, why not? I never spoke against IDNs but using UTF8 in HTTP headers.
 And having HTTP working is much more important if you ask me. I see you've
 found IDN / PUNYCODE, that's a directorion to go.

 > In order to achieve that, an php IDN library needs to be employed. The
 most promising one appears to be:
 [http://freshmeat.net/projects/php_net_idna] and it is GPL'd.
 Sorry that's me who needs to say that: That library is written in PHP 5.
 [http://pear.php.net/package/Net_IDNA Net_IDNA] ships with PHP 4 support.
 WordPress is PHP 4 code, so PHP 5 is not an option here (but PHP 5 is very
 much OK for a plugin).

 > Using that library this issue would be resolved by the included patch,
 this current patch should work for all cases and not break any existing
 functionality.

 to load library files, please see this line of code:
 {{{
 require_once dirname(dirname(__FILE__)) . '/Renderer.php';
 }}}
 (Taken from ''wp-includes/Text/Diff/Renderer/inline.php'' line 19)

 This might give you an idea how you can include, for example with your
 plugin:

 {{{
 require_once dirname(dirname(__FILE__)) . 'idna_convert.class.php';
 }}}
 (having the full path prevents the system to search your include file in
 the various places)

 Keep in mind that HTTP headers must be valid ASCII, that's why

 {{{
 header("Location: http://www.uddannelsesstøtte.dk");
 }}}

 is not a bug in PHP. that's not ASCII (7bit) for the headers, so just do
 not wonder if that does not work properly here and there. You can learn
 all details about HTTP in [http://tools.ietf.org/html/rfc1945 RFC 1945]
 and [http://tools.ietf.org/html/rfc2616 RFC 2616].

 I hope this information was helpfull to you to improve your plugin and to
 think about how this can be properly implemented in the core. Libraries
 for core are located in the wp-includes directory.

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


More information about the wp-trac mailing list