Double-byte characters in querystring using PHP

Posted by Jeffrey Berthiaume on Stack Overflow See other posts from Stack Overflow or by Jeffrey Berthiaume
Published on 2010-03-29T19:50:19Z Indexed on 2010/03/29 19:53 UTC
Read the original article Hit count: 502

Filed under:
|
|
|

I'm trying to figure out how to create personalized urls for double-byte languages.

For example, this url from Amazon Japan has Japanese characters within the querystring (specifically, the path):

http://www.amazon.co.jp/????????-DVD-???/dp/B00005R5J3/ref=sr_1_3?ie=UTF8&s=dvd&qid=1269891925&sr=8-3

What I would like to do is have:

http://www.mysite.com/????????

or even

http://www.mysite.com/index.php?name=????????

be able to properly decode the $GET[name] string.

I think I have tried all of the urldecode and utf8_decode possibilities, but I just get gibberish in response.

This all works fine in a form $_POST, but I need these urls to be emailable...

© Stack Overflow or respective owner

Related posts about double-byte

Related posts about japanese