WordPress.org

Support

Support » Alpha/Beta » Internal Link don't support Chinese language

Internal Link don't support Chinese language

  • Hello,

    I tested WordPress 3.1 RC1, and the internal link feature still don’t work with Chinese language. I didn’t test other non-English language. Please check it.

    Thank you.

    Jiang, from wpchina.org

Viewing 15 replies - 1 through 15 (of 18 total)
  • Andrew Nacin
    Lead Developer

    @nacin

    I imagine it just hasn’t been translated to Chinese yet, no?

    I imagine it just hasn’t been translated to Chinese yet, no?

    I think it is should use UTF-8 for url address.

    just now, we have to edit the wp-includes/classes.php for chinese or other laguage link address.

    now we using the code in wp-includes/classes.php.

    if ( isset($_SERVER['PATH_INFO']) )
    $pathinfo = $_SERVER['PATH_INFO'];
    else
    $pathinfo = '';
    $pathinfo_array = explode('?', $pathinfo);
    $pathinfo = str_replace("%", "%25", $pathinfo_array[0]);
    $req_uri = $_SERVER['REQUEST_URI'];
    
    Change to:
    
    if ( isset($_SERVER['PATH_INFO']) )
    $pathinfo = mb_convert_encoding($_SERVER['PATH_INFO'], "UTF-8", "GBK");
    else
    $pathinfo = '';
    $pathinfo_array = explode('?', $pathinfo);
    $pathinfo = str_replace("%", "%25", $pathinfo_array[0]);
    $req_uri = mb_convert_encoding($_SERVER['REQUEST_URI'], "UTF-8", "GBK");

    and when I upload an chinese file name file,it is not find the file and show.

    to Andrew Nacin and liuxyon,

    Our wpchina.org has translated the language file to Chinese, while it is an unoffical chinese version.

    The issue has no relation with the language file. I am not a php programmer, while I guess it is the search code don’t support utf8 coding method?

    Please check it. I hope this can reslove before final release.

    Jiang from wpchina.org

    and when I upload the file of chinese file name, it is not find the been upload file.

    We need some more information to reproduce it, what are the exact steps?

    Trac ticket: http://core.trac.wordpress.org/ticket/16256

    just you upload files of chinese file name and it will can’t work.

    and when your the post tile name is chinese. then the chinese url can’t work.

    Sergey Biryukov
    WordPress Dev

    @sergeybiryukov

    Please provide some examples of a file name or post title.

    I’ve tested Internal Linking with “Hello World” translated to Chinese (via Google Translate) and it seemed to work fine.

    now WP3.1RC3 can upload chinese file,but it still not show.

    /wp-uploads/2011/01/姜昆.jpg

    Sergey Biryukov
    WordPress Dev

    @sergeybiryukov

    As per Nacin’s comment on the ticket, let’s focus on one issue at a time. What is the problem with Internal Linking?

    I have reply in ticket.

    Andrew Nacin
    Lead Developer

    @nacin

    Your replies have been consistently inadequate. Please elaborate further.

    maybe I find upload chinese file name, it isn’t download reason.

    Because when I upload chinese name file via wordpress admin control after, then the file name be force change other encode file name. maybe is utf-8?

    such as:

    The real chinese file name is: 完美GPS信息_Ulysee Gizmos_1.5.2.rar

    upload via WP after file name change to:
    瀹岀編GPS淇℃伅_Ulysee-Gizmos_1.5.2.rar

    I do not know if this report is the same as earlier post, but after I did upgrade to wp 3.1 suddenly all my blogs which have japanese character as the article content got errors as they became show something like “%blah%blah%blah…” instead of its japanese character (russian character also has the problem)
    when:
    1. Internal URL link in UTF-8 clicked
    2. searching words in kanji CJK or russian character

    what do you think ?

    thannk you.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Internal Link don't support Chinese language’ is closed to new replies.