BELUGABEHR commented on issue #882: ZOOKEEPER-3342: Use StandardCharsets
URL: https://github.com/apache/zookeeper/pull/882#issuecomment-478602932
 
 
   @tamaashu Java also historically has used the same encoding as the one your 
presented.  Regardless, UTF-8 can capture all UTF-16 values (and then some).  
Like all things Java, the character encoding works correctly across platforms.
   
   
https://softwareengineering.stackexchange.com/questions/174947/why-does-java-use-utf-16-for-internal-string-representation
   
   I wouldn't recommend making the character encoding a configurable option.
   
   1. There's no way currently to record the encoding used in all the various 
places ZK, so if the default changes between server restarts, reading a 
snapshot, reading a ZNode name, reading a ZNode value, etc. may break.
   2.  Allowing for a configurable character encoding will explode the test 
metric for ZK.  Using UTF-8, which covers pretty much every language, will keep 
the testing in-check.
   
   Since we're changing to UTF-8, which is most permissive, the chance of a 
backwards capability issue is very low.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to