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) {
611611 }
612612
613613 private void appendString (final String value ) throws VPackBuilderException {
614- final int length = value .length () ;
614+ final int length = value .getBytes (). length ;
615615 if (length <= 126 ) {
616616 // short string
617617 add ((byte ) (0x40 + length ));
Original file line number Diff line number Diff line change @@ -887,4 +887,12 @@ public void addVPackObjectInArray() throws VPackException {
887887 }
888888 }
889889
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+
890898}
You can’t perform that action at this time.
0 commit comments