Merge branch 'PHP-8.1'

* PHP-8.1:
  mb_detect_encoding recognizes all letters in Hungarian alphabet
This commit is contained in:
Alex Dowad 2022-05-25 13:10:23 +02:00
commit 8b70a7db4f
3 changed files with 6 additions and 1 deletions

View File

@ -8,10 +8,12 @@
0x0118 0x011B # Polish, Czech
0x0141 0x0144 # Polish
0x0147 0x0148 # Czech
0x0150 0x0151 # Hungarian
0x0158 0x015B # Czech, Polish
0x0160 0x0161 # Used in Slavic names
0x0164 0x0165 # Czech
0x016E 0x016F # Czech
0x0170 0x0171 # Hungarian
0x0179 0x017E # Polish, Czech, other Slavic languages
0x0300 0x030A # Diacritical marks
0x0370 0x0377 # Greek

View File

@ -11,7 +11,7 @@
static uint32_t rare_codepoint_bitvec[] = {
0xffffd9ff, 0x00000000, 0x00000000, 0x80000000, 0xffffffff, 0x00002001, 0x00000000, 0x00000000,
0xf0ff0f0f, 0xffffffff, 0xf0fffe61, 0x81ff3fcc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xf0ff0f0f, 0xffffffff, 0xf0fcfe61, 0x81fc3fcc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xfffff800, 0xffffffff, 0xffffffff, 0x0300ffff, 0x0000280f, 0x00000004, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,

View File

@ -15,6 +15,7 @@ $euc_jp = "\xC6\xFC\xCB\xDC\xB8\xEC\xA5\xC6\xA5\xAD\xA5\xB9\xA5\xC8\xA4\xC7\xA4\
// UTF-8
$polish1 = "Zażółć gęślą jaźń.";
$polish2 = "Wół poszedł spać bardzo wcześnie. A to zdanie bez ogonka.";
$hungarian = "Árvíztűrő tükörfúrógép";
echo "== BASIC TEST ==\n";
@ -309,6 +310,8 @@ $czechEncodings = [
];
test($czechStrings, $czechEncodings);
test([$hungarian], ['UTF-8', 'UTF-16', 'Windows-1252']);
echo "Done!\n";
?>