Project Intelligence

Project Intelligence

14M Downloads

Garbled.

baka-gourd opened this issue · 6 comments

commented

Title garbled (stored in json).
Perhaps related to language format?
system:windows10 Pro 1809(17763.379)
rfv1
rfv2

commented

server system:windows server 2016 datacenter 64bit (10.0 v:14393)

commented

Sorry i forgot to respond do this issue. Im afraid i dont know that language so i have no idea what its supposed to look like.

commented

@brandon3055 Let me explain it:
you use FileReader method read the structure/lang/xx_xx.json file, this method has coding problems, so garbled characters appear when reading non-ASCII characters.

Code snippet with problem: LanguageManager.java#L125-L127
Solution: stackoverflow

The constructors of FileReader always use the platform default encoding which is generally a bad idea.
Instead of FileReader you need to use new InputStreamReader(new FileInputStream(pathToFile), <encoding>).

commented

Ahh ok that makes sense now. I actually had a similar issue with the markdown file where it would work fine on my Linux system but on windows it broke the select character "§"
At the time I didnt think to apply that fix to the lang file.

commented

Ok i think i have fixed it. But can you confirm before i push a new build to curse?
http://chickenbones.net/maven/com/brandon3055/projectintelligence/ProjectIntelligence/1.12.2-1.0.5.18/

commented

Thank you very much, I confirmed it again and no problem now.