jterrace / js.js

js.js: A JavaScript JavaScript interpreter
Other
1.08k stars 58 forks source link

Handle non English Characters #12

Closed AminMkh closed 5 years ago

AminMkh commented 6 years ago

Hello, I was wondering how can I tweak it to handle non English characters, as I was investigating the code, I realized the function responsible for parsing is parseUTF16. It is returning the wrong code for my characters, I am not sure if the way it is storing characters should be changed or just the parsing.

    parseUTF16 : function parseUTF16(ptr) {
        //FIXME: this assumes ascii

https://github.com/jterrace/js.js/blob/master/src/jsjs-wrapper.js#L98

Thank you for the library!