tjbush / mochiweb

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

mochijson:encode issue with {input_encoding, utf8} #33

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
14> Js = {struct,[{"key", [194,163]}]},                                         
14> io:format("~s~n", [lists:flatten((mochijson:encoder([{input_encoding, 
utf8}]))(Js))]).          
{"key":""\u00a3"}
ok

Original issue reported on code.google.com by bob.ippo...@gmail.com on 4 Apr 2009 at 9:28

GoogleCodeExporter commented 8 years ago
r98

Original comment by bob.ippo...@gmail.com on 4 Apr 2009 at 9:46

GoogleCodeExporter commented 8 years ago
how to decode \u00a3 to [194, 163] with this fix?

Original comment by vinn...@gmail.com on 6 Oct 2009 at 2:49

GoogleCodeExporter commented 8 years ago
You can't. input_encoding only affects the input, not the output.

Original comment by bob.ippo...@gmail.com on 6 Oct 2009 at 2:55