1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.htmlunit.encoding;
16
17 import static java.nio.charset.StandardCharsets.ISO_8859_1;
18 import static java.nio.charset.StandardCharsets.UTF_8;
19
20 import java.net.URL;
21 import java.nio.charset.Charset;
22 import java.nio.charset.StandardCharsets;
23 import java.util.ArrayList;
24 import java.util.Collection;
25 import java.util.List;
26
27 import org.apache.commons.io.ByteOrderMark;
28 import org.apache.commons.lang3.ArrayUtils;
29 import org.htmlunit.WebDriverTestCase;
30 import org.htmlunit.junit.BrowserParameterizedRunner;
31 import org.htmlunit.junit.BrowserParameterizedRunner.Default;
32 import org.htmlunit.junit.annotation.Alerts;
33 import org.htmlunit.util.MimeType;
34 import org.junit.Test;
35 import org.junit.runner.RunWith;
36 import org.junit.runners.Parameterized.Parameter;
37 import org.junit.runners.Parameterized.Parameters;
38 import org.openqa.selenium.WebDriver;
39 import org.openqa.selenium.WebDriverException;
40
41
42
43
44
45
46
47 @RunWith(BrowserParameterizedRunner.class)
48 public class CssStyleSheetEncodingTest extends WebDriverTestCase {
49
50 private static final String BOM_UTF_16LE = "BOMUTF16LE";
51 private static final String BOM_UTF_16BE = "BOMUTF16BE";
52 private static final String BOM_UTF_8 = "BOMUTF8";
53
54 private static int ServerRestartCount_ = 0;
55
56 private enum TestCharset {
57 UTF8("UTF8", UTF_8),
58 ISO88591("ISO88591", ISO_8859_1),
59 GB2312("GB2312", Charset.forName("GB2312"));
60
61 private final String label_;
62 private final Charset charset_;
63
64 TestCharset(final String label, final Charset charset) {
65 label_ = label;
66 charset_ = charset;
67 }
68
69 @Override
70 public String toString() {
71 return label_;
72 }
73
74 public Charset getCharset() {
75 return charset_;
76 }
77 }
78
79
80
81
82
83
84 @Parameters
85 public static Collection<Object[]> data() throws Exception {
86 final List<Object[]> list = new ArrayList<>();
87
88 final TestCharset[] charsetHtmlResponseHeader =
89 new TestCharset[] {null, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.GB2312};
90 final TestCharset[] charsetResponseHeader = new TestCharset[] {null, TestCharset.UTF8, TestCharset.ISO88591};
91 final TestCharset[] charsetResponseEncoding = new TestCharset[] {null, TestCharset.UTF8, TestCharset.ISO88591};
92 final TestCharset[] charsetAt = new TestCharset[] {null, TestCharset.UTF8, TestCharset.ISO88591};
93 final String[] bom = {null, BOM_UTF_8, BOM_UTF_16LE, BOM_UTF_16BE};
94
95 for (final Object charsetHtml : charsetHtmlResponseHeader) {
96 for (final Object responseHeader : charsetResponseHeader) {
97 for (final Object responseEncoding : charsetResponseEncoding) {
98 for (final Object at : charsetAt) {
99 for (final Object b : bom) {
100 list.add(new Object[] {charsetHtml, responseHeader, responseEncoding, at, b});
101 }
102 }
103 }
104 }
105 }
106 return list;
107 }
108
109
110
111
112 @Parameter
113 public TestCharset charsetHtmlResponseHeader_;
114
115
116
117
118 @Parameter(1)
119 public TestCharset charsetResponseHeader_;
120
121
122
123
124 @Parameter(2)
125 public TestCharset charsetResponseEncoding_;
126
127
128
129
130 @Parameter(3)
131 public TestCharset charsetAt_;
132
133
134
135
136 @Parameter(4)
137 public String bom_;
138
139
140
141
142
143 @Test
144 @Alerts({"\"a\"", "\"\u00E4\"", "\"\u0623\u0647\u0644\u0627\u064B\"", "\"\u043C\u0438\u0440\"", "\"\u623F\u95F4\""})
145 @Default
146 public void charset() throws Exception {
147 charset(charsetHtmlResponseHeader_, charsetResponseHeader_, charsetResponseEncoding_, charsetAt_, bom_);
148 }
149
150 private void charset(
151 final TestCharset charsetHtmlResponse,
152 final TestCharset charsetCssResponseHeader,
153 final TestCharset charsetCssResponseEncoding,
154 final TestCharset charsetCssAt,
155 final String bom) throws Exception {
156
157
158 final URL cssUrl = new URL(URL_SECOND, "" + System.currentTimeMillis() + ".js");
159
160 final String html = DOCTYPE_HTML
161 + "<html><head>\n"
162 + " <link rel='stylesheet' href='" + cssUrl + "'/>\n"
163 + "<script>\n"
164 + LOG_TITLE_FUNCTION
165 + " function test() {\n"
166 + " var node = document.getElementById('c1');\n"
167 + " var style = window.getComputedStyle(node, ':before');\n"
168 + " log(style.content);\n"
169
170 + " node = document.getElementById('c2');\n"
171 + " style = window.getComputedStyle(node, ':before');\n"
172 + " log(style.content);\n"
173
174 + " node = document.getElementById('c3');\n"
175 + " style = window.getComputedStyle(node, ':before');\n"
176 + " log(style.content);\n"
177
178 + " node = document.getElementById('c4');\n"
179 + " style = window.getComputedStyle(node, ':before');\n"
180 + " log(style.content);\n"
181
182 + " node = document.getElementById('c5');\n"
183 + " style = window.getComputedStyle(node, ':before');\n"
184 + " log(style.content);\n"
185 + " }\n"
186 + "</script>\n"
187 + "</head>\n"
188 + "<body onload='test()'>\n"
189 + " <div id='c1' class='c1'>C1</div>\n"
190 + " <div id='c2' class='c2'>C2</div>\n"
191 + " <div id='c3' class='c3'>C3</div>\n"
192 + " <div id='c4' class='c4'>C4</div>\n"
193 + " <div id='c5' class='c5'>C5</div>\n"
194 + "</body>\n"
195 + "</html>";
196
197 String cssContentType = MimeType.TEXT_CSS;
198 if (charsetCssResponseHeader != null) {
199 cssContentType = cssContentType + "; charset="
200 + charsetCssResponseHeader.getCharset().name().toLowerCase();
201 }
202
203 String css = ".c1::before { content: \"a\"}"
204 + ".c2::before { content: \"\u00E4\"}"
205 + ".c3::before { content: \"\u0623\u0647\u0644\u0627\u064B\"}"
206 + ".c4::before { content: \"\u043C\u0438\u0440\"}"
207 + ".c5::before { content: \"\u623F\u95F4\"}";
208
209 if (charsetAt_ != null) {
210 css = "@charset \"" + charsetCssAt.name() + "\";\n" + css;
211 }
212
213 byte[] style = null;
214 if (charsetCssResponseEncoding == null) {
215 style = css.getBytes(UTF_8);
216 }
217 else {
218 style = css.getBytes(charsetCssResponseEncoding.getCharset());
219 }
220
221 if (BOM_UTF_8.equals(bom)) {
222 style = ArrayUtils.addAll(ByteOrderMark.UTF_8.getBytes(), css.getBytes(StandardCharsets.UTF_8));
223 }
224 else if (BOM_UTF_16BE.equals(bom)) {
225 style = ArrayUtils.addAll(ByteOrderMark.UTF_16BE.getBytes(), css.getBytes(StandardCharsets.UTF_16BE));
226 }
227 else if (BOM_UTF_16LE.equals(bom)) {
228 style = ArrayUtils.addAll(ByteOrderMark.UTF_16LE.getBytes(), css.getBytes(StandardCharsets.UTF_16LE));
229 }
230 getMockWebConnection().setResponse(cssUrl, style, 200, "OK", cssContentType, null);
231
232 String htmlContentType = MimeType.TEXT_HTML;
233 if (charsetHtmlResponse != null) {
234 htmlContentType = htmlContentType + "; charset=" + charsetHtmlResponse.getCharset().name();
235 }
236
237 Charset htmlResponseCharset = ISO_8859_1;
238 if (charsetHtmlResponse != null) {
239 htmlResponseCharset = charsetHtmlResponse.getCharset();
240 }
241
242 expandExpectedAlertsVariables(URL_FIRST);
243 final String[] expectedAlerts = getExpectedAlerts();
244 try {
245 ServerRestartCount_++;
246 if (ServerRestartCount_ == 200) {
247 stopWebServers();
248 ServerRestartCount_ = 0;
249 }
250 final WebDriver driver = loadPage2(html, URL_FIRST, htmlContentType, htmlResponseCharset, null);
251
252 assertEquals(String.join("\u00A7", getExpectedAlerts()) + '\u00A7', driver.getTitle());
253 }
254 catch (final WebDriverException e) {
255 if (!e.getCause().getMessage().contains("illegal character")
256 && !e.getCause().getMessage().contains("is not defined.")) {
257 throw e;
258 }
259
260 assertTrue(expectedAlerts.length == 1);
261 final String msg = e.getCause().getMessage();
262 assertTrue(msg, msg.contains(expectedAlerts[0]));
263 }
264 }
265
266
267
268
269 @Test
270 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
271 public void _ISO88591____() throws Exception {
272 charset(TestCharset.ISO88591, null, null, null, null);
273 }
274
275
276
277
278 @Test
279 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
280 public void _ISO88591__UTF8__() throws Exception {
281 charset(TestCharset.ISO88591, null, TestCharset.UTF8, null, null);
282 }
283
284
285
286
287 @Test
288 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
289 public void _ISO88591__ISO88591__() throws Exception {
290 charset(TestCharset.ISO88591, null, TestCharset.ISO88591, null, null);
291 }
292
293
294
295
296 @Test
297 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
298 public void _ISO88591_UTF8_ISO88591__() throws Exception {
299 charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null, null);
300 }
301
302
303
304
305 @Test
306 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
307 public void _ISO88591_ISO88591___() throws Exception {
308 charset(TestCharset.ISO88591, TestCharset.ISO88591, null, null, null);
309 }
310
311
312
313
314 @Test
315 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
316 public void _ISO88591_ISO88591___BOMUTF8() throws Exception {
317 charset(TestCharset.ISO88591, TestCharset.ISO88591, null, null, BOM_UTF_8);
318 }
319
320
321
322
323 @Test
324 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
325 public void _ISO88591_ISO88591_UTF8__() throws Exception {
326 charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null, null);
327 }
328
329
330
331
332 @Test
333 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
334 public void _ISO88591_ISO88591_UTF8__BOMUTF8() throws Exception {
335 charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null, BOM_UTF_8);
336 }
337
338
339
340
341 @Test
342 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
343 public void _ISO88591_ISO88591_ISO88591__() throws Exception {
344 charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null, null);
345 }
346
347
348
349
350 @Test
351 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
352 public void _ISO88591_ISO88591_ISO88591__BOMUTF16BE() throws Exception {
353 charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_16BE);
354 }
355
356
357
358
359 @Test
360 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
361 public void _ISO88591_ISO88591_ISO88591__BOMUTF16LE() throws Exception {
362 charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_16BE);
363 }
364
365
366
367
368 @Test
369 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
370 public void _ISO88591_ISO88591_UTF8__BOMUTF16BE() throws Exception {
371 charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null, BOM_UTF_16BE);
372 }
373
374
375
376
377 @Test
378 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
379 public void _ISO88591_ISO88591_UTF8__BOMUTF16LE() throws Exception {
380 charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null, BOM_UTF_16BE);
381 }
382
383
384
385
386 @Test
387 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
388 public void _ISO88591_ISO88591___BOMUTF16BE() throws Exception {
389 charset(TestCharset.ISO88591, TestCharset.ISO88591, null, null, BOM_UTF_16BE);
390 }
391
392
393
394
395 @Test
396 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
397 public void _ISO88591_ISO88591___BOMUTF16LE() throws Exception {
398 charset(TestCharset.ISO88591, TestCharset.ISO88591, null, null, BOM_UTF_16LE);
399 }
400
401
402
403
404 @Test
405 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
406 public void _ISO88591_UTF8_UTF8__BOMUTF16BE() throws Exception {
407 charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.UTF8, null, BOM_UTF_16BE);
408 }
409
410
411
412
413 @Test
414 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
415 public void _ISO88591_UTF8_UTF8__BOMUTF16LE() throws Exception {
416 charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.UTF8, null, BOM_UTF_16LE);
417 }
418
419
420
421
422 @Test
423 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
424 public void _ISO88591_UTF8___BOMUTF16BE() throws Exception {
425 charset(TestCharset.ISO88591, TestCharset.UTF8, null, null, BOM_UTF_16BE);
426 }
427
428
429
430
431 @Test
432 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
433 public void _ISO88591_UTF8___BOMUTF16LE() throws Exception {
434 charset(TestCharset.ISO88591, TestCharset.UTF8, null, null, BOM_UTF_16LE);
435 }
436
437
438
439
440 @Test
441 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
442 public void _ISO88591_UTF8_ISO88591__BOMUTF16BE() throws Exception {
443 charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null, BOM_UTF_16BE);
444 }
445
446
447
448
449 @Test
450 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
451 public void _ISO88591_UTF8_ISO88591__BOMUTF16LE() throws Exception {
452 charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null, BOM_UTF_16LE);
453 }
454
455
456
457
458 @Test
459 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
460 public void _UTF8__ISO88591__() throws Exception {
461 charset(TestCharset.UTF8, null, TestCharset.ISO88591, null, null);
462 }
463
464
465
466
467 @Test
468 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
469 public void _UTF8_ISO88591_ISO88591__() throws Exception {
470 charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null, null);
471 }
472
473
474
475
476 @Test
477 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
478 public void _UTF8_ISO88591_UTF8__() throws Exception {
479 charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null, null);
480 }
481
482
483
484
485 @Test
486 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
487 public void _UTF8_ISO88591___() throws Exception {
488 charset(TestCharset.UTF8, TestCharset.ISO88591, null, null, null);
489 }
490
491
492
493
494 @Test
495 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
496 public void _UTF8_UTF8_ISO88591__() throws Exception {
497 charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null, null);
498 }
499
500
501
502
503 @Test
504 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
505 public void _UTF8_UTF8_ISO88591__BOMUTF16BE() throws Exception {
506 charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null, BOM_UTF_16BE);
507 }
508
509
510
511
512 @Test
513 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
514 public void _UTF8_UTF8_ISO88591__BOMUTF16LE() throws Exception {
515 charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, null, BOM_UTF_16LE);
516 }
517
518
519
520
521 @Test
522 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
523 public void _UTF8_UTF8_UTF8__BOMUTF16BE() throws Exception {
524 charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.UTF8, null, BOM_UTF_16BE);
525 }
526
527
528
529
530 @Test
531 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
532 public void _UTF8_UTF8_UTF8__BOMUTF16LE() throws Exception {
533 charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.UTF8, null, BOM_UTF_16LE);
534 }
535
536
537
538
539 @Test
540 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
541 public void _UTF8_UTF8___BOMUTF16BE() throws Exception {
542 charset(TestCharset.UTF8, TestCharset.UTF8, null, null, BOM_UTF_16BE);
543 }
544
545
546
547
548 @Test
549 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
550 public void _UTF8_UTF8___BOMUTF16LE() throws Exception {
551 charset(TestCharset.UTF8, TestCharset.UTF8, null, null, BOM_UTF_16LE);
552 }
553
554
555
556
557 @Test
558 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
559 public void _UTF8_ISO88591_UTF8__BOMUTF8() throws Exception {
560 charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null, BOM_UTF_8);
561 }
562
563
564
565
566 @Test
567 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
568 public void _UTF8_ISO88591___BOMUTF8() throws Exception {
569 charset(TestCharset.UTF8, TestCharset.ISO88591, null, null, BOM_UTF_8);
570 }
571
572
573
574
575 @Test
576 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
577 public void __ISO88591_ISO88591__() throws Exception {
578 charset(null, TestCharset.ISO88591, TestCharset.ISO88591, null, null);
579 }
580
581
582
583
584 @Test
585 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
586 public void __ISO88591_UTF8__() throws Exception {
587 charset(null, TestCharset.ISO88591, TestCharset.UTF8, null, null);
588 }
589
590
591
592
593 @Test
594 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
595 public void __ISO88591___() throws Exception {
596 charset(null, TestCharset.ISO88591, null, null, null);
597 }
598
599
600
601
602 @Test
603 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
604 public void __UTF8_ISO88591__() throws Exception {
605 charset(null, TestCharset.UTF8, TestCharset.ISO88591, null, null);
606 }
607
608
609
610
611 @Test
612 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
613 public void __UTF8_ISO88591__BOMUTF16BE() throws Exception {
614 charset(null, TestCharset.UTF8, TestCharset.ISO88591, null, BOM_UTF_16BE);
615 }
616
617
618
619
620 @Test
621 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
622 public void __UTF8_ISO88591__BOMUTF16LE() throws Exception {
623 charset(null, TestCharset.UTF8, TestCharset.ISO88591, null, BOM_UTF_16LE);
624 }
625
626
627
628
629 @Test
630 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
631 public void __UTF8_UTF8__BOMUTF16BE() throws Exception {
632 charset(null, TestCharset.UTF8, TestCharset.UTF8, null, BOM_UTF_16BE);
633 }
634
635
636
637
638 @Test
639 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
640 public void __UTF8_UTF8__BOMUTF16LE() throws Exception {
641 charset(null, TestCharset.UTF8, TestCharset.UTF8, null, BOM_UTF_16LE);
642 }
643
644
645
646
647 @Test
648 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
649 public void __UTF8___BOMUTF16BE() throws Exception {
650 charset(null, TestCharset.UTF8, null, null, BOM_UTF_16BE);
651 }
652
653
654
655
656 @Test
657 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
658 public void __UTF8___BOMUTF16LE() throws Exception {
659 charset(null, TestCharset.UTF8, null, null, BOM_UTF_16LE);
660 }
661
662
663
664
665 @Test
666 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
667 public void ___ISO88591__() throws Exception {
668 charset(null, null, TestCharset.ISO88591, null, null);
669 }
670
671
672
673
674 @Test
675 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
676 public void ___UTF8__() throws Exception {
677 charset(null, null, TestCharset.UTF8, null, null);
678 }
679
680
681
682
683 @Test
684 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
685 public void _____() throws Exception {
686 charset(null, null, null, null, null);
687 }
688
689
690
691
692 @Test
693 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
694 public void __ISO88591_UTF8__BOMUTF8() throws Exception {
695 charset(null, TestCharset.ISO88591, TestCharset.UTF8, null, BOM_UTF_8);
696 }
697
698
699
700
701 @Test
702 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
703 public void __ISO88591___BOMUTF8() throws Exception {
704 charset(null, TestCharset.ISO88591, null, null, BOM_UTF_8);
705 }
706
707
708
709
710 @Test
711 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
712 public void _GB2312_ISO88591_ISO88591__() throws Exception {
713 charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.ISO88591, null, null);
714 }
715
716
717
718
719 @Test
720 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
721 public void _GB2312_ISO88591_UTF8__() throws Exception {
722 charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.UTF8, null, null);
723 }
724
725
726
727
728 @Test
729 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
730 public void _GB2312_ISO88591___() throws Exception {
731 charset(TestCharset.GB2312, TestCharset.ISO88591, null, null, null);
732 }
733
734
735
736
737 @Test
738 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
739 public void _GB2312_UTF8_ISO88591__() throws Exception {
740 charset(TestCharset.GB2312, TestCharset.UTF8, TestCharset.ISO88591, null, null);
741 }
742
743
744
745
746 @Test
747 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
748 public void _GB2312__ISO88591__() throws Exception {
749 charset(TestCharset.GB2312, null, TestCharset.ISO88591, null, null);
750 }
751
752
753
754
755 @Test
756 @Alerts({"\"a\"", "\"盲\"", "\"兀賴賱丕賸\"", "\"屑懈褉\"", "\"鎴块棿\""})
757 public void _GB2312__UTF8__() throws Exception {
758 charset(TestCharset.GB2312, null, TestCharset.UTF8, null, null);
759 }
760
761
762
763
764 @Test
765 @Alerts({"\"a\"", "\"盲\"", "\"兀賴賱丕賸\"", "\"屑懈褉\"", "\"鎴块棿\""})
766 public void _GB2312____() throws Exception {
767 charset(TestCharset.GB2312, null, null, null, null);
768 }
769
770
771
772
773 @Test
774 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
775 public void _GB2312_ISO88591_UTF8__BOMUTF8() throws Exception {
776 charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.UTF8, null, BOM_UTF_8);
777 }
778
779
780
781
782 @Test
783 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
784 public void _GB2312_ISO88591___BOMUTF8() throws Exception {
785 charset(TestCharset.GB2312, TestCharset.ISO88591, null, null, BOM_UTF_8);
786 }
787
788
789
790
791 @Test
792 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
793 public void _GB2312_ISO88591_ISO88591__BOMUTF8() throws Exception {
794 charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_8);
795 }
796
797
798
799
800 @Test
801 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
802 public void _GB2312_ISO88591_ISO88591__BOMUTF16BE() throws Exception {
803 charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_16BE);
804 }
805
806
807
808
809 @Test
810 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
811 public void _GB2312_ISO88591_ISO88591__BOMUTF16LE() throws Exception {
812 charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_16LE);
813 }
814
815
816
817
818 @Test
819 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
820 public void _GB2312_ISO88591_UTF8__BOMUTF16BE() throws Exception {
821 charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.UTF8, null, BOM_UTF_16BE);
822 }
823
824
825
826
827 @Test
828 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
829 public void _GB2312_ISO88591_UTF8__BOMUTF16LE() throws Exception {
830 charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.UTF8, null, BOM_UTF_16LE);
831 }
832
833
834
835
836 @Test
837 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
838 public void _GB2312_ISO88591___BOMUTF16BE() throws Exception {
839 charset(TestCharset.GB2312, TestCharset.ISO88591, null, null, BOM_UTF_16BE);
840 }
841
842
843
844
845 @Test
846 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
847 public void _GB2312_ISO88591___BOMUTF16LE() throws Exception {
848 charset(TestCharset.GB2312, TestCharset.ISO88591, null, null, BOM_UTF_16LE);
849 }
850
851
852
853
854 @Test
855 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
856 public void _ISO88591_ISO88591_ISO88591__BOMUTF8() throws Exception {
857 charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_8);
858 }
859
860
861
862
863 @Test
864 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
865 public void _UTF8_ISO88591_ISO88591__BOMUTF8() throws Exception {
866 charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_8);
867 }
868
869
870
871
872 @Test
873 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
874 public void _UTF8_ISO88591_ISO88591__BOMUTF16BE() throws Exception {
875 charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_16BE);
876 }
877
878
879
880
881 @Test
882 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
883 public void _UTF8_ISO88591_ISO88591__BOMUTF16LE() throws Exception {
884 charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_16LE);
885 }
886
887
888
889
890 @Test
891 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
892 public void _UTF8_ISO88591_UTF8__BOMUTF16BE() throws Exception {
893 charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null, BOM_UTF_16BE);
894 }
895
896
897
898
899 @Test
900 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
901 public void _UTF8_ISO88591_UTF8__BOMUTF16LE() throws Exception {
902 charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null, BOM_UTF_16LE);
903 }
904
905
906
907
908 @Test
909 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
910 public void _UTF8_ISO88591___BOMUTF16BE() throws Exception {
911 charset(TestCharset.UTF8, TestCharset.ISO88591, null, null, BOM_UTF_16BE);
912 }
913
914
915
916
917 @Test
918 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
919 public void _UTF8_ISO88591___BOMUTF16LE() throws Exception {
920 charset(TestCharset.UTF8, TestCharset.ISO88591, null, null, BOM_UTF_16LE);
921 }
922
923
924
925
926 @Test
927 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
928 public void __ISO88591_ISO88591__BOMUTF8() throws Exception {
929 charset(null, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_8);
930 }
931
932
933
934
935 @Test
936 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
937 public void __ISO88591_ISO88591__BOMUTF16BE() throws Exception {
938 charset(null, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_16BE);
939 }
940
941
942
943
944 @Test
945 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
946 public void __ISO88591_ISO88591__BOMUTF16LE() throws Exception {
947 charset(null, TestCharset.ISO88591, TestCharset.ISO88591, null, BOM_UTF_16LE);
948 }
949
950
951
952
953 @Test
954 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
955 public void __ISO88591_UTF8__BOMUTF16BE() throws Exception {
956 charset(null, TestCharset.ISO88591, TestCharset.UTF8, null, BOM_UTF_16BE);
957 }
958
959
960
961
962 @Test
963 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
964 public void __ISO88591_UTF8__BOMUTF16LE() throws Exception {
965 charset(null, TestCharset.ISO88591, TestCharset.UTF8, null, BOM_UTF_16LE);
966 }
967
968
969
970
971 @Test
972 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
973 public void __ISO88591___BOMUTF16BE() throws Exception {
974 charset(null, TestCharset.ISO88591, null, null, BOM_UTF_16BE);
975 }
976
977
978
979
980 @Test
981 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
982 public void __ISO88591___BOMUTF16LE() throws Exception {
983 charset(null, TestCharset.ISO88591, null, null, BOM_UTF_16LE);
984 }
985
986
987
988
989 @Test
990 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
991 public void _GB2312_UTF8_ISO88591__BOMUTF16BE() throws Exception {
992 charset(TestCharset.GB2312, TestCharset.UTF8, TestCharset.ISO88591, null, BOM_UTF_16BE);
993 }
994
995
996
997
998 @Test
999 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1000 public void _GB2312_UTF8_ISO88591__BOMUTF16LE() throws Exception {
1001 charset(TestCharset.GB2312, TestCharset.UTF8, TestCharset.ISO88591, null, BOM_UTF_16LE);
1002 }
1003
1004
1005
1006
1007 @Test
1008 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1009 public void _GB2312_UTF8_UTF8__BOMUTF16BE() throws Exception {
1010 charset(TestCharset.GB2312, TestCharset.UTF8, TestCharset.UTF8, null, BOM_UTF_16BE);
1011 }
1012
1013
1014
1015
1016 @Test
1017 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1018 public void _GB2312_UTF8_UTF8__BOMUTF16LE() throws Exception {
1019 charset(TestCharset.GB2312, TestCharset.UTF8, TestCharset.UTF8, null, BOM_UTF_16LE);
1020 }
1021
1022
1023
1024
1025 @Test
1026 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1027 public void _GB2312_UTF8___BOMUTF16BE() throws Exception {
1028 charset(TestCharset.GB2312, TestCharset.UTF8, null, null, BOM_UTF_16BE);
1029 }
1030
1031
1032
1033
1034 @Test
1035 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1036 public void _GB2312_UTF8___BOMUTF16LE() throws Exception {
1037 charset(TestCharset.GB2312, TestCharset.UTF8, null, null, BOM_UTF_16LE);
1038 }
1039
1040
1041
1042
1043 @Test
1044 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
1045 public void _GB2312_ISO88591_ISO88591_UTF8_() throws Exception {
1046 charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null);
1047 }
1048
1049
1050
1051
1052 @Test
1053 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1054 public void _GB2312_ISO88591_UTF8_UTF8_() throws Exception {
1055 charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.UTF8, null);
1056 }
1057
1058
1059
1060
1061 @Test
1062 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1063 public void _GB2312_ISO88591__UTF8_() throws Exception {
1064 charset(TestCharset.GB2312, TestCharset.ISO88591, null, TestCharset.UTF8, null);
1065 }
1066
1067
1068
1069
1070 @Test
1071 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
1072 public void _GB2312_UTF8_ISO88591_UTF8_() throws Exception {
1073 charset(TestCharset.GB2312, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null);
1074 }
1075
1076
1077
1078
1079 @Test
1080 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
1081 public void _GB2312__ISO88591_UTF8_() throws Exception {
1082 charset(TestCharset.GB2312, null, TestCharset.ISO88591, TestCharset.UTF8, null);
1083 }
1084
1085
1086
1087
1088 @Test
1089 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
1090 public void _ISO88591_ISO88591_ISO88591_UTF8_() throws Exception {
1091 charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null);
1092 }
1093
1094
1095
1096
1097 @Test
1098 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1099 public void _ISO88591_ISO88591_UTF8_UTF8_() throws Exception {
1100 charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.UTF8, null);
1101 }
1102
1103
1104
1105
1106 @Test
1107 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1108 public void _ISO88591_ISO88591__UTF8_() throws Exception {
1109 charset(TestCharset.ISO88591, TestCharset.ISO88591, null, TestCharset.UTF8, null);
1110 }
1111
1112
1113
1114
1115 @Test
1116 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
1117 public void _ISO88591_UTF8_ISO88591_UTF8_() throws Exception {
1118 charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null);
1119 }
1120
1121
1122
1123
1124 @Test
1125 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
1126 public void _ISO88591__ISO88591_UTF8_() throws Exception {
1127 charset(TestCharset.ISO88591, null, TestCharset.ISO88591, TestCharset.UTF8, null);
1128 }
1129
1130
1131
1132
1133 @Test
1134 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
1135 public void _UTF8_ISO88591_ISO88591_UTF8_() throws Exception {
1136 charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null);
1137 }
1138
1139
1140
1141
1142 @Test
1143 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1144 public void _UTF8_ISO88591_UTF8_UTF8_() throws Exception {
1145 charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.UTF8, null);
1146 }
1147
1148
1149
1150
1151 @Test
1152 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1153 public void _UTF8_ISO88591__UTF8_() throws Exception {
1154 charset(TestCharset.UTF8, TestCharset.ISO88591, null, TestCharset.UTF8, null);
1155 }
1156
1157
1158
1159
1160 @Test
1161 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
1162 public void _UTF8_UTF8_ISO88591_UTF8_() throws Exception {
1163 charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null);
1164 }
1165
1166
1167
1168
1169 @Test
1170 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
1171 public void _UTF8__ISO88591_UTF8_() throws Exception {
1172 charset(TestCharset.UTF8, null, TestCharset.ISO88591, TestCharset.UTF8, null);
1173 }
1174
1175
1176
1177
1178 @Test
1179 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
1180 public void __ISO88591_ISO88591_UTF8_() throws Exception {
1181 charset(null, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, null);
1182 }
1183
1184
1185
1186
1187 @Test
1188 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1189 public void __ISO88591_UTF8_UTF8_() throws Exception {
1190 charset(null, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.UTF8, null);
1191 }
1192
1193
1194
1195
1196 @Test
1197 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1198 public void __ISO88591__UTF8_() throws Exception {
1199 charset(null, TestCharset.ISO88591, null, TestCharset.UTF8, null);
1200 }
1201
1202
1203
1204
1205 @Test
1206 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
1207 public void __UTF8_ISO88591_UTF8_() throws Exception {
1208 charset(null, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, null);
1209 }
1210
1211
1212
1213
1214 @Test
1215 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
1216 public void ___ISO88591_UTF8_() throws Exception {
1217 charset(null, null, TestCharset.ISO88591, TestCharset.UTF8, null);
1218 }
1219
1220
1221
1222
1223 @Test
1224 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
1225 public void _GB2312_ISO88591_ISO88591_ISO88591_() throws Exception {
1226 charset(TestCharset.GB2312, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null);
1227 }
1228
1229
1230
1231
1232 @Test
1233 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
1234 public void _GB2312_ISO88591_UTF8_ISO88591_() throws Exception {
1235 charset(TestCharset.GB2312, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null);
1236 }
1237
1238
1239
1240
1241 @Test
1242 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
1243 public void _GB2312_UTF8_ISO88591_ISO88591_() throws Exception {
1244 charset(TestCharset.GB2312, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null);
1245 }
1246
1247
1248
1249
1250 @Test
1251 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1252 public void _GB2312_ISO88591__ISO88591_() throws Exception {
1253 charset(TestCharset.GB2312, TestCharset.ISO88591, null, TestCharset.ISO88591, null);
1254 }
1255
1256
1257
1258
1259 @Test
1260 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
1261 public void _GB2312__ISO88591_ISO88591_() throws Exception {
1262 charset(TestCharset.GB2312, null, TestCharset.ISO88591, TestCharset.ISO88591, null);
1263 }
1264
1265
1266
1267
1268 @Test
1269 @Alerts({"\"a\"", "\"盲\"", "\"兀賴賱丕賸\"", "\"屑懈褉\"", "\"鎴块棿\""})
1270 public void _GB2312__UTF8_ISO88591_() throws Exception {
1271 charset(TestCharset.GB2312, null, TestCharset.UTF8, TestCharset.ISO88591, null);
1272 }
1273
1274
1275
1276
1277 @Test
1278 @Alerts({"\"a\"", "\"盲\"", "\"兀賴賱丕賸\"", "\"屑懈褉\"", "\"鎴块棿\""})
1279 public void _GB2312___ISO88591_() throws Exception {
1280 charset(TestCharset.GB2312, null, null, TestCharset.ISO88591, null);
1281 }
1282
1283
1284
1285
1286 @Test
1287 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
1288 public void _ISO88591_ISO88591_ISO88591_ISO88591_() throws Exception {
1289 charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null);
1290 }
1291
1292
1293
1294
1295 @Test
1296 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1297 public void _ISO88591_ISO88591_UTF8_ISO88591_() throws Exception {
1298 charset(TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null);
1299 }
1300
1301
1302
1303
1304 @Test
1305 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1306 public void _ISO88591_ISO88591__ISO88591_() throws Exception {
1307 charset(TestCharset.ISO88591, TestCharset.ISO88591, null, TestCharset.ISO88591, null);
1308 }
1309
1310
1311
1312
1313 @Test
1314 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
1315 public void _ISO88591_UTF8_ISO88591_ISO88591_() throws Exception {
1316 charset(TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null);
1317 }
1318
1319
1320
1321
1322 @Test
1323 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
1324 public void _ISO88591__ISO88591_ISO88591_() throws Exception {
1325 charset(TestCharset.ISO88591, null, TestCharset.ISO88591, TestCharset.ISO88591, null);
1326 }
1327
1328
1329
1330
1331 @Test
1332 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1333 public void _ISO88591__UTF8_ISO88591_() throws Exception {
1334 charset(TestCharset.ISO88591, null, TestCharset.UTF8, TestCharset.ISO88591, null);
1335 }
1336
1337
1338
1339
1340 @Test
1341 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1342 public void _ISO88591___ISO88591_() throws Exception {
1343 charset(TestCharset.ISO88591, null, null, TestCharset.ISO88591, null);
1344 }
1345
1346
1347
1348
1349 @Test
1350 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
1351 public void _UTF8_ISO88591_ISO88591_ISO88591_() throws Exception {
1352 charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null);
1353 }
1354
1355
1356
1357
1358 @Test
1359 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1360 public void _UTF8_ISO88591_UTF8_ISO88591_() throws Exception {
1361 charset(TestCharset.UTF8, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null);
1362 }
1363
1364
1365
1366
1367 @Test
1368 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1369 public void _UTF8_ISO88591__ISO88591_() throws Exception {
1370 charset(TestCharset.UTF8, TestCharset.ISO88591, null, TestCharset.ISO88591, null);
1371 }
1372
1373
1374
1375
1376 @Test
1377 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
1378 public void _UTF8_UTF8_ISO88591_ISO88591_() throws Exception {
1379 charset(TestCharset.UTF8, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null);
1380 }
1381
1382
1383
1384
1385 @Test
1386 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
1387 public void _UTF8__ISO88591_ISO88591_() throws Exception {
1388 charset(TestCharset.UTF8, null, TestCharset.ISO88591, TestCharset.ISO88591, null);
1389 }
1390
1391
1392
1393
1394 @Test
1395 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1396 public void _UTF8__UTF8_ISO88591_() throws Exception {
1397 charset(TestCharset.UTF8, null, TestCharset.UTF8, TestCharset.ISO88591, null);
1398 }
1399
1400
1401
1402
1403 @Test
1404 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1405 public void _UTF8___ISO88591_() throws Exception {
1406 charset(TestCharset.UTF8, null, null, TestCharset.ISO88591, null);
1407 }
1408
1409
1410
1411
1412 @Test
1413 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
1414 public void __ISO88591_ISO88591_ISO88591_() throws Exception {
1415 charset(null, TestCharset.ISO88591, TestCharset.ISO88591, TestCharset.ISO88591, null);
1416 }
1417
1418
1419
1420
1421 @Test
1422 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1423 public void __ISO88591_UTF8_ISO88591_() throws Exception {
1424 charset(null, TestCharset.ISO88591, TestCharset.UTF8, TestCharset.ISO88591, null);
1425 }
1426
1427
1428
1429
1430 @Test
1431 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1432 public void __ISO88591__ISO88591_() throws Exception {
1433 charset(null, TestCharset.ISO88591, null, TestCharset.ISO88591, null);
1434 }
1435
1436
1437
1438
1439 @Test
1440 @Alerts({"\"a\"", "\"�\"", "\"?????\"", "\"???\"", "\"??\""})
1441 public void __UTF8_ISO88591_ISO88591_() throws Exception {
1442 charset(null, TestCharset.UTF8, TestCharset.ISO88591, TestCharset.ISO88591, null);
1443 }
1444
1445
1446
1447
1448 @Test
1449 @Alerts({"\"a\"", "\"ä\"", "\"?????\"", "\"???\"", "\"??\""})
1450 public void ___ISO88591_ISO88591_() throws Exception {
1451 charset(null, null, TestCharset.ISO88591, TestCharset.ISO88591, null);
1452 }
1453
1454
1455
1456
1457 @Test
1458 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1459 public void ___UTF8_ISO88591_() throws Exception {
1460 charset(null, null, TestCharset.UTF8, TestCharset.ISO88591, null);
1461 }
1462
1463
1464
1465
1466 @Test
1467 @Alerts({"\"a\"", "\"ä\"", "\"أهلاً\"", "\"мир\"", "\"房间\""})
1468 public void ____ISO88591_() throws Exception {
1469 charset(null, null, null, TestCharset.ISO88591, null);
1470 }
1471 }