Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have successfully used the redirection plug-in for a long time but for a recent project I am supposed to redirect URLs containing chinese characters and I can´t make the redirections to work with them.

I can enter the redirection rules (no regex involved, only single one to one redirections) but URLs are not redirected.

Any idea of what is going on? Is this possible at all?

share|improve this question

1 Answer 1

well , while dealing with chinese characters - there are MANY problems that can cause this , but many times , it is as simple as the encoding of the php files. (simple as a figure of speech - you will soon understand why )

A PHP file is a TXt file . and even if it is only a what seems a "simple" txt file, it can actually be encoded in many ways .

ANSI,Unicode ,UTF-8,UCS-2 Big Endian , UCS-2 little Endian, etc, etc ... ..and all of which can be with BOM or without BOM. :-)

Now, Chinese has their own character encoding method, which are even more complicated and highly confusing. some of the ones I know are : BIG5, GB 2312, GBK, HZ , and so on and so on ...

further more - to you they might look the same , but for a Chinese person they are different . they are divided into categories (mainly 2 - Chinese traditional and simplified) AND each is used in different geographical regions . (for example, Chinese traditional is Taiwan, Hong Kong, while simplified is in mostly . mainland china)

so.. after this introduction, what you have to do , is actually open all your files in a software that can read the character encoding , change it , and try o see if it works . I recommend notepad++ . go to FORMAT menu, change the encoding, see if the characters are still what it should be , and if it is - save, and then try again.

In my experiance , the best format for almost all foreign languages is actually UTF-8 without BOM.

that being said - it is always a bad practice to use foreign characters (especially chinese) for URLs. in extreme cases your server might even not be able to handle them .

share|improve this answer
    
I can visualize the content in the posts and so on, my question was specifically regarding whether the redirection plug-in can work with chinese characters –  Jordi Cabot Dec 6 '11 at 16:41
    
my answer is still the same , check the redirection plugin´s files for character sets. and also your if your server supports them.. –  krembo99 Dec 7 '11 at 2:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.