WordPress.org

Ready to get started?Download WordPress

Forums

Internal Link don't support Chinese language (19 posts)

  1. wpchina
    Member
    Posted 3 years ago #

    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

  2. Andrew Nacin
    Lead Developer
    Posted 3 years ago #

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

  3. liuxyon
    Member
    Posted 3 years ago #

    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");
  4. liuxyon
    Member
    Posted 3 years ago #

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

  5. wpchina
    Member
    Posted 3 years ago #

    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

  6. liuxyon
    Member
    Posted 3 years ago #

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

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

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

  8. liuxyon
    Member
    Posted 3 years ago #

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

  9. liuxyon
    Member
    Posted 3 years ago #

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

  10. Sergey Biryukov
    WordPress Dev
    Posted 3 years ago #

    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.

  11. liuxyon
    Member
    Posted 3 years ago #

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

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

  12. Sergey Biryukov
    WordPress Dev
    Posted 3 years ago #

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

  13. liuxyon
    Member
    Posted 3 years ago #

    I have reply in ticket.

  14. Andrew Nacin
    Lead Developer
    Posted 3 years ago #

    Your replies have been consistently inadequate. Please elaborate further.

  15. liuxyon
    Member
    Posted 3 years ago #

    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

  16. cingcong
    Member
    Posted 3 years ago #

    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.

  17. cingcong
    Member
    Posted 3 years ago #

    tested on other's website :

    when I search the words "hello word" translated using google translator in chinese character and russian in someone's blog which also using wp 3.1 :

    http://www.masjoe.com/search/%E4%BD%A0%E5%A5%BD%E4%B8%96%E7%95%8C.html
    http://www.masjoe.com/search/你好世界.html
    http://www.masjoe.com/search/привет-мир.html

    they are all should NOT produced percent blah percent blah chars result ...

    meanwhile... these WORKED properly on wpchina.org which using wp 2.9.1 (I read it on its page source, dont know if it is a fake wp version mentioned):

    http://wpchina.org/?s=你
    http://wpchina.org/search/你

    Please somebody explain this case to me.
    thanks

  18. cingcong
    Member
    Posted 3 years ago #

    Bennet has found a solution, see his amazing work for this error on http://www.thunderguy.com/semicolon/2011/06/08/search-fixer-wordpress-plugin/

    Give him thanks!

  19. Dong Suzuki
    Member
    Posted 2 years ago #

    Is people still around? I almost kill myself to have noticed that Chinese characters are not supported in the internal link. I am using 3.2.1 and this problem havs not resolved yet.
    Let me clarify what it means by "internal link does not work with Chinese." All the names given to categories, post titles, tags, and whatever you name it, do not link to the corresponding pages or content if these names contain Chinese characters. For example, I created a static page called "艺术”, and as I click on it, it does not take me to the page I want; instead, it says
    "Bad Request Your browser sent a request that this server could not understand. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument tohandle the request. "
    I would not expect that WordPress does not support Chinese. My site contains lots of post titles in Chinese. Without the link, my site is basically useless. Now I am stuck and cannot resume building my site until it is fixed. This problem can affect many people, and I hope WordPress can fix the problem as soon as possible. I think it is a very baisc feature. How come it is not there? What am I going to do?

Topic Closed

This topic has been closed to new replies.

About this Topic