Is there a way to fix GZDoom's broken accented characters?

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Is there a way to fix GZDoom's broken accented characters?

Re: Is there a way to fix GZDoom's broken accented character

by Xane123 » Fri Jul 20, 2018 8:31 pm

The "Ê" is being interpeted correctly here!
The "Ê" is being interpeted correctly here!
Ah, thanks, that fixed it! I assume if I save the LANGUAGE lump with SLADE 3, it'll revert it to the other character set, breaking any accented characters, but Notepad++ can set the character set, which makes it appear correctly. Thanks for the help!

EDIT: Nope, edited with SLADE 3 and it kept the Ê! Perfect...

Re: Is there a way to fix GZDoom's broken accented character

by phantombeta » Fri Jul 20, 2018 8:21 pm

GZDoom uses the Windows-1252 (Windows Western) codepage. To use accented characters, the file needs to be saved in this codepage.
Most modern code editors have a "Save with encoding" option, which you can use to fix the file's encoding.

Re: Is there a way to fix GZDoom's broken accented character

by Xane123 » Fri Jul 20, 2018 8:08 pm

Looking at that page, they don't look fun to deal with! So, how do I make a language lump make the game use the correct code page? I assumed GZDoom's built-in other languages would be set up properly, but importing the Portuguese one, adding "default enu" to the list of languages at the top of the file, then making "P2TEXT" be written using CONFONT (since that string has accented characters), it still appeared broken in-game.

I can't test it with the normal Portuguese file as typing "language ptb" in the console then restarting doesn't make GZDoom use LANGUAGE.ptb so I can't test without modifying the file, possibly messing up the code page or whatever makes the accented characters break.

Re: Is there a way to fix GZDoom's broken accented character

by Gez » Fri Jul 20, 2018 3:58 pm

Is there a way to fix GZDoom's broken accented characters?

by Xane123 » Fri Jul 20, 2018 3:46 pm

Today, I found someone on Twitter that is saying they localize to Portuguese, which interested me as my game could be better with more languages due to ZDoom's LANGUAGE lump. However, I tried inserting a Portuguese text string into the game and it seems GZDoom can't render anything beyond normal letters, numbers, and symbols; If it ever tries to write something like the multiplication sign or an accented character, it gets replaced with an incorrect character. Strangely, "new line" commands (\n) break on this string too, becoming a weird square with a circle inside it on a bitmap font and two upward arrows on the console font.
GZDoom's display of accented characters. The "^" and weird block are supposed to be "\n", a new line.
GZDoom's display of accented characters. The "^" and weird block are supposed to be "\n", a new line.
I would say this is definitely a bug but I bet someone will come tell me that this isn't one, so I'm just posting here to ask if there's any way I can get non-English text to appear correctly; Both fonts have accented characters so they should be displaying correctly; Attached is a demonstration WAD that writes this string to the screen in both fonts:

Code: Select all

TEST = "Isto é uma demonstração. O ZDoom não\n"
		"exibe caracteres acentuados\n"
		"corretamente.";
It can't be the text file format as GZDoom displays an error if the format isn't ANSI, saying a character is invalid ASCII (then a negative number)
Attachments
strange_text.wad
This is a demonstration WAD that writes a sentence twice with different fonts. Both fonts support accented characters but aren't rendering correctly.
(17.35 KiB) Downloaded 68 times

Top