Code Monkey home page Code Monkey logo

Comments (3)

Xottab-DUTY avatar Xottab-DUTY commented on May 25, 2024

One thing I can add at this moment is that encoding="windows-1251" cannot be trusted.
XMLs for different localizations are encoded with different encodings, e.g. Polish uses Windows-1250, but encoding attribute in all XML files is set to windows-1251 always.. Basically, this attribute is not used in the engine anyway, so probably that's why it's not properly set and just abandoned.

Not sure if this can be considered a duplicate: #419

Could be considered as subtask :)

from xray-16.

Xottab-DUTY avatar Xottab-DUTY commented on May 25, 2024

Unless XML starts with or has another encoding attribute's value (are any other even supported?) treat file as encoded in UTF-8.

So, given my message above, it's more safe to do the reverse – treat file as UTF-8 if encoding attribute is set to utf-8.

from xray-16.

lehrax avatar lehrax commented on May 25, 2024

Riiight, now it suddenly started to make sense to me (sort of). As I opened XMLs in VS code and it was 50/50: either it opened correctly or not. So 1251 is not the only encoding supported, I see? I tried UTF-8 in declaration tag + saved file with UTF-8 encoding only to get a bunch of nonsense symbols in the game visually so my uneducated guess was it does not support UTF-8. Now I assume declaration tag is not used anywhere but these encodings (like 1251 for Russian, 1250 for Polish etc.) are stored somewhere else, right?

Where can I get that info from?

Or, if you already know what they are, could you just list what locale uses what enc:
Russian, Ukrainian ― 1251
Polish ― 1250
English ― 1252 (?)
German ― ?
Spanish ― ?
French ― ?
Italian ― ?
(And will I ruin everything by editing declaration lines to have proper encoding names or that line is basically a shebang to represent XMLs that contain translation data?)

Sorry if that is too much text 😅

from xray-16.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.