Modifies the CREATE_TRANSLATIONS tool.
- Remove _charset for PoMessageEntryList
- Add useUTF8 bool variable and helper function
- Add UTF-8 checking for each po file. Error out if file is not coded in UTF-8.
Because po files now (should) use UTF-8, a bunch of code in ScummVM is redundant. This commit addresses that.
- Remove charsetMapping and related variables.
- Remove the code that used these functions.
- Remove cp_parser.cpp. This is removed because the use of codepages is no longer needed.
- Remove iso-8859-x codepages (see above message)
- Always set mapping as 0 in ThemeEngine::loadScalableFont
- Check if ascii or not by getting charset in about dialog.
- Changes made in create_translations tool and translations.cpp
- After converting po files to UTF-8, length of block did not fit in 16 bits. This commit addresses that.
We have been abusing the 'Language' field to store the language name
that appears in the GUI for a translation. But this field is officially
supposed to store the language code, and most tools that edit po file
set it automatically. This has caused the language being changed by
mistake in the paste.
There is a provision for custom fields with a name starting with 'X-'
though. So Now, if defined, it will use the custom 'X-Language-name'
field, and fall back to 'Language' in case that custom field is not defined.
This should prevent the language being lost when not careful while
editing the translation.
The charsets used by the translations now need to have a "$(name).cp" file,
which contains an charset index => unicode mapping. Otherwise
create_translations will fail.