mirror of
https://github.com/php/php-src.git
synced 2024-10-01 06:46:08 +00:00
77ee200097
get_html_translation_table() with encoding ISO-8859-1 and HTMLENTITIES was broken. Only entities for characters U+0000 to U+0040 were being included in the result.
122 lines
2.2 KiB
PHP
122 lines
2.2 KiB
PHP
--TEST--
|
||
Test get_html_translation_table() function: htmlentities/HTML 4/ISO-8859-1 (bug #64011)
|
||
--FILE--
|
||
<?php
|
||
|
||
function so($a,$b) { return ord($a) - ord($b); }
|
||
|
||
$table = HTML_ENTITIES;
|
||
$tt = get_html_translation_table($table, ENT_COMPAT, "ISO-8859-1");
|
||
uksort( $tt, 'so' );
|
||
var_dump( count($tt) );
|
||
print_r( $tt );
|
||
echo "Done\n";
|
||
|
||
?>
|
||
--EXPECT--
|
||
int(100)
|
||
Array
|
||
(
|
||
["] => "
|
||
[&] => &
|
||
[<] => <
|
||
[>] => >
|
||
[ ] =>
|
||
[¡] => ¡
|
||
[¢] => ¢
|
||
[£] => £
|
||
[¤] => ¤
|
||
[¥] => ¥
|
||
[¦] => ¦
|
||
[§] => §
|
||
[¨] => ¨
|
||
[©] => ©
|
||
[ª] => ª
|
||
[«] => «
|
||
[¬] => ¬
|
||
[] => ­
|
||
[®] => ®
|
||
[¯] => ¯
|
||
[°] => °
|
||
[±] => ±
|
||
[²] => ²
|
||
[³] => ³
|
||
[´] => ´
|
||
[µ] => µ
|
||
[¶] => ¶
|
||
[·] => ·
|
||
[¸] => ¸
|
||
[¹] => ¹
|
||
[º] => º
|
||
[»] => »
|
||
[¼] => ¼
|
||
[½] => ½
|
||
[¾] => ¾
|
||
[¿] => ¿
|
||
[À] => À
|
||
[Á] => Á
|
||
[Â] => Â
|
||
[Ã] => Ã
|
||
[Ä] => Ä
|
||
[Å] => Å
|
||
[Æ] => Æ
|
||
[Ç] => Ç
|
||
[È] => È
|
||
[É] => É
|
||
[Ê] => Ê
|
||
[Ë] => Ë
|
||
[Ì] => Ì
|
||
[Í] => Í
|
||
[Î] => Î
|
||
[Ï] => Ï
|
||
[Ð] => Ð
|
||
[Ñ] => Ñ
|
||
[Ò] => Ò
|
||
[Ó] => Ó
|
||
[Ô] => Ô
|
||
[Õ] => Õ
|
||
[Ö] => Ö
|
||
[×] => ×
|
||
[Ø] => Ø
|
||
[Ù] => Ù
|
||
[Ú] => Ú
|
||
[Û] => Û
|
||
[Ü] => Ü
|
||
[Ý] => Ý
|
||
[Þ] => Þ
|
||
[ß] => ß
|
||
[à] => à
|
||
[á] => á
|
||
[â] => â
|
||
[ã] => ã
|
||
[ä] => ä
|
||
[å] => å
|
||
[æ] => æ
|
||
[ç] => ç
|
||
[è] => è
|
||
[é] => é
|
||
[ê] => ê
|
||
[ë] => ë
|
||
[ì] => ì
|
||
[í] => í
|
||
[î] => î
|
||
[ï] => ï
|
||
[ð] => ð
|
||
[ñ] => ñ
|
||
[ò] => ò
|
||
[ó] => ó
|
||
[ô] => ô
|
||
[õ] => õ
|
||
[ö] => ö
|
||
[÷] => ÷
|
||
[ø] => ø
|
||
[ù] => ù
|
||
[ú] => ú
|
||
[û] => û
|
||
[ü] => ü
|
||
[ý] => ý
|
||
[þ] => þ
|
||
[ÿ] => ÿ
|
||
)
|
||
Done
|