ExtraCells2 icon indicating copy to clipboard operation
ExtraCells2 copied to clipboard

malformed char in CJK translations

Open dixyes opened this issue 6 years ago • 1 comments

Although translation files (of all CJK translations including SC TC JP and KR) on github is correct, it's become malformed in released jar versions.

This also occured in latest version ExtraCells-1.12.2-2.6.2a.jar (downloaded from curseforge)

It seems something wrong in CI systems.

also see #593

There‘s some byte (which in some special range) in single 3-byte utf-8 char become "?" (0x3f)

Here are some malformed char and how they transformed

>>> "流".encode()
b'\xe6\xb5\x81' # which become b'\xe6\xb5?'
>>> "发".encode()
b'\xe5\x8f\x91' # which become b'\xe5\x8f?'
>>> "携".encode()
b'\xe6\x90\xba' # which become b'\xe6?\xba'
>>> "板".encode()
b'\xe6\x9d\xbf' # which become b'\xe6?\xbf'
>>> "块".encode()
b'\xe5\x9d\x97' # which become b'\xe5?\x97'
>>> "筐".encode()
b'\xe7\xad\x90' # which become b'\xe7\xad?'
>>> "ポ".encode()
b'\xe3\x83\x9d' # which become b'\xe3\x83?'
>>> "록".encode()
b'\xeb\xa1\x9d' # which become b'\xeb\xa1?'
# even 2 bytes changed
>>> "名".encode()
b'\xe5\x90\x8d' # which become b'\xe5??'

dixyes avatar Oct 03 '19 16:10 dixyes

I cannot build jars with malformed lang file at my own pc, however,

I found a maybe-related issue at https://github.com/matthewprenger/CurseGradle/issues/9 ,was fixed at https://github.com/matthewprenger/CurseGradle/pull/18

If this cause that problem, just update CurseGradle to 1.1.1+ will fix this

@ruifung

dixyes avatar May 26 '20 08:05 dixyes