mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-25 16:08:39 +00:00
Add a test for JavaScript UTF-8 <=> UTF-16 conversion
JavaScript uses UTF-16 but FlatBuffers uses UTF-8. This commit tests the code that does the conversion between the two encodings. The last entry in the array is tricky because each code point actually requires two UTF-16 code units, unlike the other examples. The current JSON output of flatc actually handles this case incorrectly (it generates invalid JSON with UTF-8 code units). The generated JavaScript code passes these tests fine, however.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -45,6 +45,7 @@ tests/go_gen
|
||||
tests/monsterdata_java_wire.mon
|
||||
tests/monsterdata_go_wire.mon
|
||||
tests/monsterdata_javascript_wire.mon
|
||||
tests/unicode_test.mon
|
||||
CMakeLists.txt.user
|
||||
CMakeScripts/**
|
||||
CTestTestfile.cmake
|
||||
|
||||
Reference in New Issue
Block a user