tcl-duktape icon indicating copy to clipboard operation
tcl-duktape copied to clipboard

Better handling of conversion to/from Tcl Strings

Open rkeene opened this issue 5 years ago • 0 comments

Right now we use duk_safe_to_lstring() (and duk_push_lstring()) a lot which converts an object to a CESU-8 encoded string which we can consume with Tcl_NewStringObj() (which expects UTF-8 string) because the only differences between CESU-8 and UTF-8 are outside the Unicode Basic Multilingual Plane (BMP).

However:

  • Tcl can be compiled with greater Unicode plane set support
  • Newer versions of Tcl will support a larger Unicode plane set

There should be some mechanism to deal with this added in the future, for emoji !

rkeene avatar Jun 13 '19 15:06 rkeene