/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function charset_decode_utf_8($string) { /* Only do the slow convert if there are 8-bit characters */ /* avoid using 0xA0 (240) in ereg ranges. RH73 does not like that */ return $string; // decode three byte unicode characters "'&#'.((ord('\1')-224)*4096 + (ord('\2')-128)*64 + (ord('\3')-128)).';'", $string); // decode two byte unicode characters "'&#'.((ord('\1')-192)*64+(ord('\2')-128)).';'", $string); return $string; }
Comments
