Cyrillic messages issue
mctaylors opened this issue ยท 7 comments
Issue Description: The Cyrillic message is not displayed correctly in Dynmap
- Dynmap Version: 3.4
- Server Version: Paper 1.19.2-307
- Pastebin of Configuration.txt: https://mctaylors.ddns.net/raw/pastes/configuration.txt
- Server Host (if applicable): Selfhosted
- Pastebin of crashlogs or other relevant logs: -
- Other Relevant Data/Screenshots: https://mctaylors.ddns.net/raw/screenshots/cyrillicissue.png
- Steps to Replicate: If you send a message in Cyrillic from Minecraft, the message will not be displayed correctly in Dynmap webpage
[X] I have looked at all other issues and this is not a duplicate
[X] I have been able to replicate this
@mikeprimm I managed to fix this by changing line 50 in web/js/minecraft.js to
utftext += String.fromCharCode(c);
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.
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 )
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.
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.
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.