File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
main/java/com/arangodb/velocypack
test/java/com/arangodb/velocypack Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -611,7 +611,7 @@ private void appendSQLTimestamp(final Timestamp value) {
611
611
}
612
612
613
613
private void appendString (final String value ) throws VPackBuilderException {
614
- final int length = value .length () ;
614
+ final int length = value .getBytes (). length ;
615
615
if (length <= 126 ) {
616
616
// short string
617
617
add ((byte ) (0x40 + length ));
Original file line number Diff line number Diff line change @@ -887,4 +887,12 @@ public void addVPackObjectInArray() throws VPackException {
887
887
}
888
888
}
889
889
890
+ @ Test
891
+ public void nonASCII () {
892
+ final String s = "·ÃÂ" ;
893
+ final VPackSlice vpack = new VPackBuilder ().add (s ).slice ();
894
+ assertThat (vpack .isString (), is (true ));
895
+ assertThat (vpack .getAsString (), is (s ));
896
+ }
897
+
890
898
}
You can’t perform that action at this time.
0 commit comments