File tree 1 file changed +27
-0
lines changed
csv/src/test/java/com/fasterxml/jackson/dataformat/csv/failing
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ package com .fasterxml .jackson .dataformat .csv .failing ;
2
+
3
+ import java .nio .charset .StandardCharsets ;
4
+
5
+ import com .fasterxml .jackson .databind .*;
6
+
7
+ import com .fasterxml .jackson .dataformat .csv .*;
8
+
9
+ // [dataformats-text#497]: 3-byte UTF-8 character at end of content
10
+ public class UnicodeRead497Test extends ModuleTestBase
11
+ {
12
+ private final CsvMapper MAPPER = mapperForCsv ();
13
+
14
+ // [dataformats-text#497]
15
+ public void testUnicodeAtEnd () throws Exception
16
+ {
17
+ StringBuilder sb = new StringBuilder (4001 );
18
+ for (int i = 0 ; i < 4000 ; ++i ) {
19
+ sb .append ('a' );
20
+ }
21
+ sb .append ('\u5496' );
22
+ String doc = sb .toString ();
23
+ JsonNode o = MAPPER .reader () //.with(schema)
24
+ .readTree (doc .getBytes (StandardCharsets .UTF_8 ));
25
+ assertNotNull (o );
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments