Tuesday, May 1, 2012

how to escaping the URL for the Japanese characters


Share at Facebook

how to escaping the URL for the Japanese characters? I found a simple way to bypass this problem when i was using shift_jis. example:



$japanese_chars = "チタン";
$encoded_japanese_chars = uri_escape(encode('shiftjis', $japanese_chars));
my $url = "http://www.example.com?param=$encoded_japanese_chars";




No comments: