fork(27) download
  1. <?php
  2.  
  3. // Set the locale to something that's UTF-8 capable
  4. setlocale(LC_ALL, 'en_US.UTF-8');
  5.  
  6. $str = "a\u0308a\u0308";
  7.  
  8. // Convert the codepoints to entities
  9. $str = preg_replace("/\\\\u([0-9a-fA-F]{4})/", "&#x\\1;", $str);
  10.  
  11. // Convert the entities to a UTF-8 string
  12. $str = html_entity_decode($str, ENT_QUOTES, 'UTF-8');
  13.  
  14. // Convert the UTF-8 string to an ISO-8859-1 string
  15. echo iconv("UTF-8", "ISO-8859-1//TRANSLIT", $str);
Success #stdin #stdout 0.01s 20560KB
stdin
Standard input is empty
stdout
aa