macmiller
macmiller

Reputation: 324

UTF-8 Characters in URL

I have two sites that run in parallel, one is in English and the other is in Thai language. Just got done updating the english site and now looking at the Thai site (to update). They are both wordpress sites. In wordpress (v 3.2.1) there is a settings->permalinks. On the English site I recently changed this from the default (www.mywebsite.com/?p=123) to /%category%/%postname%/ to yield something like www.mywebsite.com/category/important-stuff/. This works fine [required changing the .htaccess file]. Now looking to possibly do the same on the Thai site, where the category and postname fields contain both English characters and Thai UTF-8 characters. Basically I'm just wondering if most sites where the pages are non English characters are now mostly building URLs in non English characters, and if there are any downsides to doing this. (or any problems related to UTF-8 URL's generated from permalink/.htaccess within Wordpress) Help/advice appreciated.

Upvotes: 1

Views: 3600

Answers (2)

Eran Or
Eran Or

Reputation: 1532

For non English URL: I'm using IIS with fcgi and I found the solution for non english slug in different places on the web: for Hebrew: here for more info about IIS7 URL Rewrite and Symbols : here generally except the IIS configuration for pretty url you need to add to the end of the wp-config.php:

    if (isset($_SERVER['UNENCODED_URL']))
$_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL'];

here you will find more about UNENCODED_URL

Upvotes: 9

Pleun
Pleun

Reputation: 8920

My site is in Russian but I do not have cyrillics in the URL. I used to have them but it gave more troubles than i expected.

Downsides are amongst others

  • is that officially you need to URL encode this UTF-8 charachters and it looks very weird to the user. More info on wikipedia: http://en.wikipedia.org/wiki/Percent-encoding
  • tools like Google webmaster etc. do have some issues with these charachters

Upvotes: 1

Related Questions