Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static function convertUTF8($string)
- {
- //$sampleString = 'u0986u09a8u09c7u09beu09dfu09beu09b0 u09b9u09c7u09beu09b8u09beu0987u09a8';
- $string = preg_replace('/u([0-9a-fA-F]+)/', '&#x$1;', $string);
- return html_entity_decode($string, ENT_COMPAT, 'UTF-8');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement