Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.1.0
-
None
-
None
-
Apache Atlas 2.1.0 embedded HBASE and SOLR
Description
The Export API returns a ZIP file with some JSON files describing Atlas Entities and TypeDefs.
I am having an issue where some special chars in JSON are being replaced by "?" chars.
An Entity name like "Distribuição" was exported in JSON file like "Distribui??o". The special chars "çã" was replaced for the "??" chars.
I tried to change the exported JSON file encoding and the request header for Export API but without success.
After analyzing the Atlas source code, especially the splitAndWriteBytes method of the ZipSink class, I thought if maybe the problem is because the s.getBytes() is returning the JSON string to be written to ZIP with another encoding than UTF-8, and maybe set the encode like s.getBytes(StandardCharsets.UTF_8) could be a solution.
It's my first contact with the Atlas source code, and I'm not a JAVA programmer, so it's only a guess.
I saw that it's possible to set the default to encode to the platform or JVM, but how they said in this below discussion, perhaps this doesn't work properly in all situations.
https://stackoverflow.com/questions/361975/setting-the-default-java-character-encoding