ClassiCube
ClassiCube copied to clipboard
Add Unicode conversion for when Goodly (et al.) breaks "Use System Font" option.
This is related to #652 but is more in the flavour of ISO2022 or ISO8859-X rather than full unicode.
This comes down to adding a unicode translation table to match the default.png file (eg: default.ucs) which contains a translation from the 256 codes to unicode codepoints. Versions of the application that cannot use this (or have "use system font" turned off) would be able to continue to use default.png as now. This would be used to convert to and from UTF8 (or UCS2, Ansi codepage) to the line character set. No server side changes would be required, though some form of translation support might be nice.
This would apparently add support of all languages except Chinese and Korean (in reality many other oddities such as Vietnamese, Arabic and Hebrew would also not work). Japanese would be partially supported (as usual!!) via Katakana and/or Hiragana codepoints.
For @Goodlyay, the UCS translation would allow translations with unicode emoji codepoints instead of line graphics. Et al. would have many other codepoints such as ▁▂▃▄▅▆▇█ ⌛ ⚧ ⛄ ✡ available in small doses.
Notes:
- This has the same issues as ISO8859-X in that you cannot support multiple languages at the same time unless they use the same alphabet (ie everyone falls back to English).
- The console (and server logs) could easily support this, but that would involve the server downloading the
texture.zipfile. Even without this offline translation from the "broken cp437" is feasible. - This can be implemented piecemeal, with "Enhanced System Font support" for some client variants.
- Treating the Line character set as CP950, UTF-8, VISCII or any other set with multi-byte components is not possible with this.
Very cool idea. I would add that I think having to tie the translation table to the texture pack is a bad idea. This would only increase the issue that is already present with servers that modify default.png to add new meanings to characters. Since the server chat is global, everyone needs to be able to see the same thing regardless of the map they're in. Unfortunately maps can have any texture pack, which means that every time the font is changed, over 100 texture packs (in my case) have to be updated just to keep things consistent throughout the server. And this doesn't even mention texture packs that I don't host and thus can't update, making chat in those maps desync-in-meaning from others.
I think this suggestion calls for a new packet that sends both a translation table and a default.png (which overrides any that the texture pack you're using provides). This way a coherent language can be implemented across the entire server without hassle.
To be clear: You have to tie the translation to the font file so the files must be stored in the same place.
You have, however, highlighted that some random web server is really the wrong place to store these highly customisable files. I would suggest that a better extension to add to the system is a more general file download process, for which the server can specify and provide the collection of resources needed for a given map.
A possible example would be to allow URLs of the form mc:~chat/default.png to be specified for the parts of the resources.
I can see this applying to textures, bot skins, the "char.png" skin and the other model default skins as well as the chat. Basically everything except icons.png, and maybe even that.
I chose the URL form so that it is clear but doesn't collide with the normal mc://host:port/user/pass ids.
Oh, and these things should be saved into the *.cw file.
Perhaps this should be a separate suggestion.
NB: One way of thinking about this is that the perfect place for the default.zip file for server mc://192.0.2.1:25565/user is http://192.0.2.1:25565/~texpack/default.zip but with a protocol compatible with mc:.