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.
This commit is contained in:
Evan Wallace
2015-10-14 23:07:40 -07:00
parent 79222bf100
commit 4bef5e89c4
5 changed files with 119 additions and 51 deletions

View File

@@ -1,5 +1,13 @@
{
"name": "unicode_test",
"testarrayoftables": [
{ "name": "Цлїςσδε" },
{ "name": "フムアムカモケモ" },
{ "name": "フムヤムカモケモ" },
{ "name": "㊀㊁㊂㊃㊄" },
{ "name": "☳☶☲" },
{ "name": "𡇙𝌆" }
],
"testarrayofstring": [
"Цлїςσδε",
"フムアムカモケモ",