Tuesday, May 1, 2012

How to Escaping URL for the Japanese characters

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:

Get function name programaticaly - Python

This little piece of code will help you to get the function name programatically. This is very helpful when you are implementing the debug...