Closed KoishiMoe closed 6 months ago
Thanks.
Yeah, it's really a nuisance that Python could handle things just fine, but Java - for which the properties format was basically invented - can't. If your solution works, it may be just an encoding issue after all. Question is what does Python do in order to handle things right without any hints as to the encoding?
Thanks for your tip. I checked the source of the official server and found that it would try to open the file in UTF-8 first, and if it failed, it would fall back to ISO_8859_1. And it only uses UTF-8 when saving it. I'll send a pr soon.
A simple example:
It should be converted to
\u6d4b\u8bd5
, but in fact it's converted to\u00e6\u00b5\u008b\u00e8\u00af\u0095
(æµè¯
)The old python version can do this properly. Seems that java.util.Properties will try ASCII by default. I tried to fix it in this commit, but I'm not sure if there're better ways to do it.