How does CouchDB handle UTF-8?

I am very puzzled by CouchDB: if I send a PUT request with some JSON string fields encoded as UTF-8, characters without 7-bit ASCII characters are converted to the escape sequence "\ uXXXX". Is there any way to tell him not to run away from UNICODE?

+3
source share
2 answers

Those \uXXXXare the correct way to encode UTF-8 characters in Javascript.

Given that CouchDB is accessing using JSON (i.e. Javascript data), these sequences should be reset when using the data, and this should not be a problem.

+5
source

CouchDB mochiweb / JSON.

, witch \uXXXX.

:

  • CouchDB
  • src/mochiweb/mochijson2.erl
  • -record(encoder, {handler=null, utf8=false}). 45.
  • utf8=true
  • ; ; make install

http://erlangine.feautec.pp.ru/?p=232, , , - CouchDB.

0

Source: https://habr.com/ru/post/1737515/


All Articles