rzel / ocamljs

Automatically exported from code.google.com/p/ocamljs
Other
0 stars 0 forks source link

jslib_pp brokes unicode strings by escaping it #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Use a string with unicode characters.

What is the expected output? What do you see instead?
escaped sequence

What version of the product are you using? On what operating system?
trunk

Please provide any additional information below.
JSString.escaped from jslib_pp.ml doesn't know anything about unicode. I
know that ocaml unicode support isn't good and it's pretty hard to use a
single solution for the encodings zoo but I need to deploy my project to
the Russian market.
I've made a workaround by skipping unprintable characters, you may see it
in the attached patch. It's ugly but better than nothing.

Original issue reported on code.google.com by redch...@gmail.com on 7 Oct 2009 at 2:17

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you for the report. I will not take your patch; I would rather fix it 
properly 
assuming UTF8.

Original comment by jake.don...@gmail.com on 24 Nov 2009 at 4:34

GoogleCodeExporter commented 9 years ago
What about patch using camomile? It escapes utf8 but does it properly (using \u
notation).

Original comment by redch...@gmail.com on 24 Nov 2009 at 1:36

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks, I have committed the patch (except that I copied in the small parts of 
camomile 
needed, rather than pick up another install dependency).

Original comment by jake.don...@gmail.com on 24 Nov 2009 at 7:07