|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2016-12-27 12:13 UTC] cmb@php.net
 
-Package: unicodestring
+Package: Strings related
  [2016-12-27 12:13 UTC] cmb@php.net
  [2016-12-27 13:54 UTC] cmb@php.net
 
-Status: Open
+Status: Verified
  [2016-12-27 13:54 UTC] cmb@php.net
  [2018-07-15 21:21 UTC] cmb@php.net
 
-Assigned To:
+Assigned To: cmb
  [2018-07-15 21:43 UTC] cmb@php.net
  [2018-07-15 21:43 UTC] cmb@php.net
 
-Status: Verified
+Status: Closed
 | |||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 01:00:01 2025 UTC | 
Description: ------------ PHP-version: 5.6.29-0+deb8u1 (on Linux plesk4.duocast.net 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64) Some entries obtained from get_html_translation_table have a missing closing semicolon. E.g. [8402] => &nvlt (should be <⃒) [8421] => &bne etc. If you run the test script below (not the most sophisticated, but a quicky), the invalid entries will be in red. Test script: --------------- $vec = get_html_translation_table( HTML_ENTITIES, ENT_QUOTES | ENT_HTML5); foreach ($vec as $key => $value) { $dec = Utf2code( $key ); if (substr($value,-1,1)!=';') echo "<br>[$dec] => &<span class=red>".substr($value,1)."</span> = $value;"; else echo "<br>[$dec] => &".substr($value,1)." = $value"; } function Utf2code( $latin ) { $magic = 128; $i = $cnt = 0; while ($i < strlen($latin) ) { $kar = substr( $latin, $i, 1 ); $num = ord( $kar ); if (strlen($latin)==1) return( $num ); if ($num >= $magic) { $cnt++; $mask = $magic; $len = $utf = 0; while ($mask & $num) { $len++; $mask = $mask/2; }; $utf = ($mask-1) & $num; $j = 1; while ($j < $len) { $kar = substr( $latin, $i+$j, 1 ); if ((192 & ord( $kar )) != 128) break; $utf = ($utf * 64) + (63 & ord($kar)); $j++; }; if (($j==$len) and ($len<=6)) { //Assume UTF return( $utf ); }; }; $i++; }; return( -1 ); }; Expected result: ---------------- A dump of the html (entity) translation table, with incomplete entries flagged in red.