diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..aae774f Binary files /dev/null and b/.DS_Store differ diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000..9c0ec10 Binary files /dev/null and b/src/.DS_Store differ diff --git a/src/Punycode.php b/src/Punycode.php index fbc54dd..9f73ab8 100644 --- a/src/Punycode.php +++ b/src/Punycode.php @@ -35,6 +35,14 @@ class Punycode 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + 'ก', 'ข', 'ฃ', 'ค', 'ฅ', 'ฆ', 'ง', 'จ', 'ฉ', 'ช', 'ซ', 'ฌ', + 'ญ', 'ฎ', 'ฏ', 'ฐ', 'ฑ', 'ฒ', 'ณ', 'ด', 'ต', 'ถ', 'ท', 'ธ', + 'ณ', 'ด', 'ต', 'ถ', 'ท', 'ธ', 'น', 'บ', 'ป', 'ผ', 'ฝ', 'พ', + 'ฟ', 'ม', 'ย', 'ร', 'ล', 'ว', 'ศ', 'ษ', 'ส', 'ห', 'ฬ', 'อ', + 'ฮ', 'ะ', 'ิ', 'ี', 'ึ', '์', 'ุ', 'ู', 'เ', 'แ', 'โ', 'ำ', + 'ใ', 'ไ', 'ฤ','ฤา', 'ฦ', 'ฦา', 'โ', '่', '้', '๊', '๋', '็', + '์' + ); /** @@ -48,7 +56,20 @@ class Punycode 'm' => 12, 'n' => 13, 'o' => 14, 'p' => 15, 'q' => 16, 'r' => 17, 's' => 18, 't' => 19, 'u' => 20, 'v' => 21, 'w' => 22, 'x' => 23, 'y' => 24, 'z' => 25, '0' => 26, '1' => 27, '2' => 28, '3' => 29, - '4' => 30, '5' => 31, '6' => 32, '7' => 33, '8' => 34, '9' => 35 + '4' => 30, '5' => 31, '6' => 32, '7' => 33, '8' => 34, '9' => 35, + 'ก' => 36, 'ข' => 37, 'ฃ' => 38, 'ค' => 39, 'ฅ' => 40, 'ฆ' => 41, + 'ง' => 42, 'จ' => 43, 'ฉ' => 44, 'ช' => 45, 'ซ' => 46, 'ฌ' => 47, + 'ญ' => 48, 'ฎ' => 49, 'ฏ' => 50, 'ฐ' => 51, 'ฑ' => 52, 'ฒ' => 53, + 'ณ' => 54, 'ด' => 55, 'ต' => 56, 'ถ' => 57, 'ท' => 58, 'ธ' => 59, + 'ณ' => 60, 'ด' => 61, 'ต' => 62, 'ถ' => 63, 'ท' => 64, 'ธ' => 65, + 'น' => 66, 'บ' => 67, 'ป' => 68, 'ผ' => 69, 'ฝ' => 70, 'พ' => 71, + 'ฟ' => 72, 'ม' => 73, 'ย' => 74, 'ร' => 75, 'ล' => 76, 'ว' => 77, + 'ศ' => 78, 'ษ' => 79, 'ส' => 80, 'ห' => 81, 'ฬ' => 82, 'อ' => 83, + 'ฮ' => 84, 'ะ' => 85, 'ิ' => 86, 'ี' => 87, 'ึ' => 88, '์' => 89, + 'ุ' => 90, 'ู' => 91, 'เ' => 92, 'แ' => 93, 'โ' => 94, 'ำ' => 95, + 'ใ' => 96, 'ไ' => 97, 'ฤ' => 98,'ฤา' => 99, 'ฦ' => 100,'ฦา' => 101, + 'โ' => 102,'่' => 103,'้' => 104, '๊' => 105, '๋' => 106, '็' => 107, + '์' => 108 ); /** diff --git a/tests/PunycodeTest.php b/tests/PunycodeTest.php index 5c87223..3cb3ef1 100644 --- a/tests/PunycodeTest.php +++ b/tests/PunycodeTest.php @@ -150,6 +150,14 @@ public function domainNamesProvider() 'άέήίΰαβγδεζηθικλμνξοπρσστυφχ.com', 'xn--hxacdefghijklmnopqrstuvw0caz0a1a2a.com' ), + array( + 'อีเมลทดสอบ@ยูเอทดสอบ.ไทย', + 'xn--@-wxfbjcqd3cnz1df2afdd6jpd7fk.xn--o3cw4h' + ), + array( + 'อีเมลทดสอบ@ทีเอชนิค.องค์กร.ไทยย', + 'xn--@-0wfr2bocpe4dyb5c5afd1idj2qka.xn--12cfi8ixb8l.xn--o3cw4h' + ), ); }