Page 1 of 1

Hungarian translate bug

Posted: 05 Nov 2018, 09:02
by awe74
Hi!

I have installed hungarian translate, but accents are wrong.
Image
Can someone help me?

Re: Hungarian translate bug

Posted: 05 Nov 2018, 10:13
by Capostrophic
What content language have you set? That affects the assumed encoding of content files. You might have to either use Polish (Win-1250) or English (Win-1252).

Re: Hungarian translate bug

Posted: 05 Nov 2018, 11:29
by awe74
This is ESM content decoding table (hex):
AA = ú (*)
AC = á
AB = é (*)
A6 = ő
A3 = ü
87 = ö
A5 = ó (*)
B5 = í
7B = ű
F2 = Á
F1 = É
BB = Ü (*)
BA = Ö (*)
B1 = Í
E7 = Ő
E8 = Ú
BC = Ó

(*) : Wrong letters

Re: Hungarian translate bug

Posted: 05 Nov 2018, 12:14
by akortunov
In theory, Hungarian translation should use the win1250 encoding, but your glyphs do not look as a valid encoding.
Does this localization a fan-made? If yes, it may use a custom encoding with custom font files.
So if win1250-win1252 encodings do not work, your localization simply is not supported, as other fan-made ones.

Re: Hungarian translate bug

Posted: 05 Nov 2018, 12:44
by awe74
Hungarian translation use custom font.

Re: Hungarian translate bug

Posted: 05 Nov 2018, 14:23
by awe74
Capostrophic wrote:
05 Nov 2018, 10:13
What content language have you set? That affects the assumed encoding of content files. You might have to either use Polish (Win-1250) or English (Win-1252).
English (Win-1252)

Re: Hungarian translate bug

Posted: 05 Nov 2018, 15:14
by Capostrophic
AA = ú (*)
AB = é (*)
A5 = ó (*)
BB = Ü (*)
BA = Ö (*)
AA corresponds to prima ordinal indicator symbol which is replaced with "a".
AB corresponds to double left-pointing angle quotation mark which is replaced with "<".
A5 corresponds to yen sign which is replaced with "Y".
BB corresponds to double right-pointing angle quotation mark which is replaced with ">".
BA corresponds to primo ordinal indicator which is replaced with "o".

This is valid for Windows-1252 encoding and the same glyph replacement is happening in English and Russian versions of the game.
Unless the font could somehow affect that. You could try to install Pelagiad font, there's no glyph replacement for TrueType fonts. Or, again, try to use Polish encoding, maybe that would fix that (probably not).

Re: Hungarian translate bug

Posted: 06 Nov 2018, 11:03
by awe74
I have fixed this problem.
5 line modified in the "fontloader.cpp":

additional.insert(std::make_pair(243, 0x00A5)); // yen sign
additional.insert(std::make_pair(250, 0x00AA)); // prima ordinal indicator
additional.insert(std::make_pair(233, 0x00AB)); // double left-pointing angle quotation
additional.insert(std::make_pair(214, 0x00BA)); // primo ordinal indicator
additional.insert(std::make_pair(220, 0x00BB)); // double right-pointing angle quotation

Hungarian translate working perfectly!

Image

Re: Hungarian translate bug

Posted: 06 Nov 2018, 11:16
by psi29a
Sweet, send a PR or MR and become a contributor. :)

https://gitlab.com/OpenMW/openmw maybe add an issue on the issue tracker