apache / dubbo-hessian-lite

Hessian Lite for Apache Dubbo
Apache License 2.0
53 stars 47 forks source link

Length should be utf-8 bytes array length #13

Open ecyuan opened 5 years ago

ecyuan commented 5 years ago

https://github.com/dubbo/hessian-lite/blob/5a74492fb347b358bbc19350b695d082171ad3e9/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2Output.java#L891 Here should use utf-8 bytes array length, not chars length. Emoji chars's length is 2 in Java, but other language eg. PHP is 4.