Add UTF-8 support to the JavaScript API
This adds an optional argument to generated getters for string fields to specify the encoding type and overloads the createString() function. It's now possible to use either JavaScript UTF-16 string objects or C-style UTF-8 byte arrays (Uint8Array) for string data.
Showing
- js/flatbuffers.js 53 additions, 30 deletionsjs/flatbuffers.js
- src/idl_gen_js.cpp 26 additions, 9 deletionssrc/idl_gen_js.cpp
- tests/JavaScriptTest.js 17 additions, 0 deletionstests/JavaScriptTest.js
- tests/monster_test_generated.js 12 additions, 9 deletionstests/monster_test_generated.js
- tests/unicode_test.json 8 additions, 0 deletionstests/unicode_test.json
Loading
Please register or sign in to comment