PHP: bin2hex, hex2bin function

$b5 = '我愛你'; //Traditional Chinese
$gb = '我爱你'; //Simplified Chinese

print 'B5: '.bin2hex($b5);
print 'GB: '.bin2hex($gb);

print 'B5:'.pack("H*", bin2hex($b5));
print 'GB:'.pack("H*", bin2hex($gb));

Comments

Popular posts from this blog

TCPDF How to show/display Chinese Character?

Wordpress Load balancing: 2 web servers 1 MySQL without any Cloud services

Using wget bypass htaccess username password 401 authorization