1 AT_BANNER([encoding guesser])
4 AT_KEYWORDS([encoding guesser])
5 AT_CHECK([echo string | encoding-guesser-test Auto,ISO-8859-1], [0], [ASCII
10 AT_KEYWORDS([encoding guesser])
11 AT_CHECK([i18n-test supports_encodings ISO-8859-1])
12 AT_CHECK([printf '\346\227\245\346\234\254\350\252\236\n' | encoding-guesser-test Auto,ISO-8859-1], [0], [UTF-8
16 AT_SETUP([UTF-8 starting with ASCII])
17 AT_KEYWORDS([encoding guesser])
18 AT_CHECK([i18n-test supports_encodings ISO-8859-1])
19 AT_CHECK([printf 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\346\227\245\346\234\254\350\252\236\n' | encoding-guesser-test Auto,ISO-8859-1 32], [0], [UTF-8
23 AT_SETUP([UTF-16 with big-endian byte order mark])
24 AT_KEYWORDS([encoding guesser])
25 AT_CHECK([printf '\376\377' | encoding-guesser-test Auto,ISO-8859-1],
30 AT_SETUP([UTF-16 with little-endian byte order mark])
31 AT_KEYWORDS([encoding guesser])
32 AT_CHECK([printf '\377\376' | encoding-guesser-test Auto,ISO-8859-1],
38 AT_KEYWORDS([encoding guesser])
39 AT_CHECK([printf '\0e\0n\0t\0r\0\351\0e\0\n' | encoding-guesser-test Auto,ISO-8859-1],
44 dnl Unicode U+XX00 characters are confusing in UTF-16 because they look
45 dnl likely to be of the opposite endianness, so this tests for proper handling.
46 AT_SETUP([UTF-16BE starting with U+0100])
47 AT_KEYWORDS([encoding guesser])
48 AT_CHECK([printf '\1\0\0e\0n\0t\0r\0\351\0e\0\n' | encoding-guesser-test Auto,ISO-8859-1],
54 AT_KEYWORDS([encoding guesser])
55 AT_CHECK([printf 'e\0n\0t\0r\0\351\0e\0\n\0' | encoding-guesser-test Auto,ISO-8859-1],
60 dnl Unicode U+XX00 characters are confusing in UTF-16 because they look
61 dnl likely to be of the opposite endianness, so this tests for proper handling.
62 AT_SETUP([UTF-16LE starting with U+0100])
63 AT_KEYWORDS([encoding guesser])
64 AT_CHECK([printf '\0\1e\0n\0t\0r\0\351\0e\0\n\0' | encoding-guesser-test Auto,ISO-8859-1],
69 AT_SETUP([UTF-32 with big-endian byte order mark])
70 AT_KEYWORDS([encoding guesser])
71 AT_CHECK([printf '\0\0\376\377' | encoding-guesser-test Auto,ISO-8859-1],
76 AT_SETUP([UTF-32 with little-endian byte order mark])
77 AT_KEYWORDS([encoding guesser])
78 AT_CHECK([printf '\377\376\0\0' | encoding-guesser-test Auto,ISO-8859-1],
84 AT_KEYWORDS([encoding guesser])
85 AT_CHECK([printf '\0\0\0e\0\0\0n\0\0\0t\0\0\0r\0\0\0\351\0\0\0e\0\0\0\n' | encoding-guesser-test Auto,ISO-8859-1],
91 AT_KEYWORDS([encoding guesser])
92 AT_CHECK([printf 'e\0\0\0n\0\0\0t\0\0\0r\0\0\0\351\0\0\0e\0\0\0\n\0\0\0' | encoding-guesser-test Auto,ISO-8859-1],
97 AT_SETUP([ISO-8859-1])
98 AT_KEYWORDS([encoding guesser])
99 AT_CHECK([i18n-test supports_encodings ISO-8859-1])
100 AT_CHECK([printf 'entr\351e\n' | encoding-guesser-test Auto,ISO-8859-1],
105 AT_SETUP([GB-18030 with byte order mark])
106 AT_KEYWORDS([encoding guesser])
107 AT_CHECK([i18n-test supports_encodings ISO-8859-1])
108 AT_CHECK([printf '\204\061\225\063' | encoding-guesser-test Auto,ISO-8859-1],
113 AT_SETUP([UTF-EBCDIC with byte order mark])
114 AT_KEYWORDS([encoding guesser])
115 AT_CHECK([i18n-test supports_encodings ISO-8859-1])
116 AT_CHECK([printf '\335\163\146\163' | encoding-guesser-test Auto,ISO-8859-1],
121 AT_SETUP([EUC-JP as Auto,EUC-JP])
122 AT_KEYWORDS([encoding guesser])
123 AT_CHECK([i18n-test supports_encodings EUC-JP])
124 AT_CHECK([printf '\244\241 \244\242 \244\243 \244\244 \244\245 \244\246 \244\247 \244\250 \244\251 \244\252\n' | encoding-guesser-test Auto,EUC-JP],
129 AT_SETUP([EUC-JP starting with ASCII as Auto,EUC-JP])
130 AT_KEYWORDS([encoding guesser])
131 AT_CHECK([i18n-test supports_encodings EUC-JP])
132 AT_CHECK([printf 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \244\241 \244\242 \244\243 \244\244 \244\245 \244\246 \244\247 \244\250 \244\251 \244\252\n' | encoding-guesser-test Auto,EUC-JP 32],
137 AT_SETUP([UTF-8 with character split across input buffers])
138 AT_KEYWORDS([encoding guesser])
139 AT_CHECK([i18n-test supports_encodings ISO-8859-1])
140 AT_CHECK([printf '\343\201\201\343\201\202\343\201\203\343\201\204\343\201\205\343\201\206\343\201\207\343\201\210\343\201\211\343\201\212\343\201\201\343\201\202\343\201\203\343\201\204\343\201\205\343\201\206\343\201\207\343\201\210\343\201\211\343\201\212\n' | encoding-guesser-test Auto,ISO-8859-1 32],
145 AT_SETUP([windows-1252 as Auto,UTF-8])
146 AT_KEYWORDS([encoding guesser])
147 AT_CHECK([i18n-test supports_encodings windows-1252])
148 AT_CHECK([printf 'entr\351e' | encoding-guesser-test Auto,UTF-8 32], [0],