Hello All!
CouchDB now using modified version of mochijson2 for JSON output.
The standard behavior of this library is to accept unicode in all forms
(unicode, utf8, \uXXXX) via decode/1,
but when unicode is emitted via encode/1 to the client app, all unicode symbols
are converted to \uXXXX form.
This is done for maximal compatibility. But I suspect, that modern software,
which may want to interact with CouchDB, will have no problems with raw UTF8.
Recent version of mochiweb (r99) introduces an optional capability for
mochijson2 to emit raw utf8.
The proposed way is:
Encoder = mochijson2:encoder([{utf8, true}]),
JSON = Encoder(json())
I have tested this patch (in reduced form) against CouchDB and it seems to be
working.
I think, that bringing this option to CouchDB will be a good improvement for
developers of international software.
--
WBR,
Dmi.