Closed GoogleCodeExporter closed 8 years ago
and maybe you now howto handle with {struct, []} member to do it atom (now it
is string
in response)
Original comment by vinn...@gmail.com
on 6 Oct 2009 at 2:45
mochijson decodes to unicode code points, not to UTF-8, so what you want is not
possible. When it encodes
a binary as a string (by default) it considers it to be UTF-8 because binaries
only contain octets, but when it
encodes a list it assumes it to be unicode code points.
You need to change your code to use mochijson2 if you want UTF-8 in both
directions. mochijson will never
return atoms directly because that can cause a leak in the atom table.
The library is doing exactly what it's supposed to do in this case, if you need
help you might want to try the
google group.
Original comment by bob.ippo...@gmail.com
on 6 Oct 2009 at 2:53
I written small wrapper to handle this trouble
it can be used by
json:decode(Json).
see attach
Original comment by vinn...@gmail.com
on 6 Oct 2009 at 6:32
new version of my wrapper with encode and decode function
Original comment by vinn...@gmail.com
on 7 Oct 2009 at 7:48
Attachments:
Original issue reported on code.google.com by
vinn...@gmail.com
on 6 Oct 2009 at 2:43