Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTF-8 and new Documents via Client API #18

Closed
jackeywall opened this issue May 8, 2015 · 1 comment
Closed

UTF-8 and new Documents via Client API #18

jackeywall opened this issue May 8, 2015 · 1 comment

Comments

@jackeywall
Copy link

I'm using the Java client API 1.0 in my project to input/post documents to DocumentDb. Many of the DocumentDb JSON documents include text in languages with diacritic marks.

The POJO to JSON conversion is performed via FasterXML Jackson - code has been in production for some time (18 months) with JSON being written to Mongo, ElasticSearch, and Postgres (JSON and now JSONB). The UTF-8 encoding of the JSON to those data stores has not been an issue. However, the same JSON written to DocumentDB will lose its encoding; e.g.,

ou vítimas de maus tratos da região

becomes:

becomes: ou v�timas de maus tratos da regi�o

Inputting (updating) the document from the Azure Portal with the encoded text works, so it appears to be an issue with the client code. I'm checking the byte[] for UTF-8 encoding and no issues prior to inputting JSON to the client API for document creation - again the same JSON goes into the other data stores with no issues.

As seen here, dependencies are managed via Ivy - not relevant to the issue - just not keene on directly managing the Java DocumentDb source directly, much prefer just referencing the lib.

I welcome ideas and suggestions - thank you in advance ...

Jack

@shipunyc
Copy link
Contributor

Fixed. I will push a new release today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants