webbukkit / dynmap

A set of Minecraft mods that provide a real time web-based map system for various Minecraft server implementations.
https://www.reddit.com/r/Dynmap/
Apache License 2.0
2.05k stars 419 forks source link

Cyrillic messages issue #3890

Closed mctaylors closed 1 year ago

mctaylors commented 1 year ago

Issue Description: The Cyrillic message is not displayed correctly in Dynmap

mikeprimm commented 1 year ago

Make sure your edit of configuration.txt is using UTF-8 code page, not 1251 or ISO-8859-15 (windows default). It's a YAML file, and text needs to be either UTF-8, or use unicode escape sequences (e.g. \u2009 )

mctaylors commented 1 year ago

Make sure your edit of configuration.txt is using UTF-8 code page, not 1251 or ISO-8859-15 (windows default). It's a YAML file, and text needs to be either UTF-8, or use unicode escape sequences (e.g. \u2009 )

I am 100% sure that my configuration.txt saved in UTF-8 encoding.

rautamiekka commented 1 year ago

If you're on Window$, you can use Notepad++ or Visual Studio Code (or VSCodium) or some other proper editor to check/convert.

^ On Linux (and probly Mac) they're usually UTF-8 by default, but graphical ones tend to have an option to choose, or at least print, and then there's iconv -f utf-8 -t utf-8 < 'FILE.yml' > /dev/null to test for valid UTF-8.

mctaylors commented 1 year ago

If you're on Window$, you can use Notepad++ or Visual Studio Code (or VSCodium) or some other proper editor to check/convert.

^ On Linux (and probly Mac) they're usually UTF-8 by default, but graphical ones tend to have an option to choose, or at least print, and then there's iconv -f utf-8 -t utf-8 < 'FILE.yml' > /dev/null to test for valid UTF-8.

image

mctaylors commented 1 year ago

image

JurgenKuyper commented 1 year ago

@mikeprimm I managed to fix this by changing line 50 in web/js/minecraft.js to

utftext += String.fromCharCode(c);

image If I change the value back to

utftext += String.fromCharCode(c+848);

and enable cyrillic support, the cyrillic conversion breaks again and changes to the "thaana" entry of that character. so, long story short, cyrillic support is either broken all the way, or is no longer needed as at least my browser (firefox) handles the utf-16 characters properly.

mctaylors commented 1 year ago

yeah, thanks, it worked for me