You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error in accentuated character (encoding mismatch ?) #2226
I tried to launch the game with a different language (French) and all accentuated characters are wrongly displayed as it's often the case with encoding mismatch.
step to reproduce
1° pick a different language (French) in knossos
2° start a training campaign, press F2 and see all those characters being wrongly displayed
configuration
fso: all versions I could try (to 3.8.0 to nightly)
os: mac os 10.14.6
Djamé
ps: let me know if bug reports are welcome even for a niche platform (mac os, French)
Having played around with non-ASCII before, I tried reproducing this with the UTF-8 Option switched on (by setting $Unicode mode: true in a -mod.tbm).
Turns out that this issue is much more serious, as the game won't even start in UTF-8 mode (when knossos is set to French or German), as there is some sort of parsing error in the default strings.tbl
This probably correlates to the fact that the Debug Build complains about those tables being in latin-1 instead of UTF-8 (which should probably be remedied anyways). Edit: Apparently not, converting that table to utf8 did not help
To follow this up and provide up to date information:
The actual crash in unicode mode is a table issue, not strictly an engine one, and discussed specifically in #2994.
This still leaves the default non-unicode vf fonts being unable to render accentuated characters. With the game having support for german and french both needing non-ascii, and after discussing this with @z64555 on discord in regards to the new, localized control code which can bind keycodes that are not strictly ascii, it would probably be good to provide a basic default fallback font that can render unicode text even when not in unicode mode. It doesn't even need to look fancy or massively well integrated, just that the character itself is legible.
The best way to do that, I think, would be to use the non-accented character glyph. Transform é to e, ü to u, etc. It would be necessary to 1) detect that the original glyph can't be displayed, and 2) map the undisplayable glyph to a displayable one.
I checked this on a current build. It depends on the fonts in use.
Start the game with no mods (retail data only) in French. On retail data it took both Language=French in the ini and -language French; either alone stayed English.
Start a training mission and click Options (F2) in the briefing.
Pick the lowest skill level.
The label reads "Trs facile". The original bitmap fonts have no accented letters, so é, è, à and the rest are dropped. With MediaVPs 5.0.3, which runs in Unicode mode with a TrueType font, the game starts fine in French and shows "Très facile" correctly.
Possible fixes:
In non-Unicode mode, when a bitmap font can't show an accented letter, draw the plain letter instead (é as e), as Goober5000 suggested. Key names would need an exception, as BMagnu noted, so a key bound to ü doesn't show as u.
Activity
The-E commentedon Jan 6, 2020
Bug reports, regardless of how niche a system may be, are always welcome.
BMagnu commentedon Dec 8, 2020
Having played around with non-ASCII before, I tried reproducing this with the UTF-8 Option switched on (by setting $Unicode mode: true in a -mod.tbm).
Turns out that this issue is much more serious, as the game won't even start in UTF-8 mode (when knossos is set to French or German), as there is some sort of parsing error in the default strings.tbl
This probably correlates to the fact that the Debug Build complains about those tables being in latin-1 instead of UTF-8 (which should probably be remedied anyways). Edit: Apparently not, converting that table to utf8 did not help
BMagnu commentedon Dec 26, 2020
To follow this up and provide up to date information:
The actual crash in unicode mode is a table issue, not strictly an engine one, and discussed specifically in #2994.
This still leaves the default non-unicode vf fonts being unable to render accentuated characters. With the game having support for german and french both needing non-ascii, and after discussing this with @z64555 on discord in regards to the new, localized control code which can bind keycodes that are not strictly ascii, it would probably be good to provide a basic default fallback font that can render unicode text even when not in unicode mode. It doesn't even need to look fancy or massively well integrated, just that the character itself is legible.
Goober5000 commentedon Dec 27, 2020
The best way to do that, I think, would be to use the non-accented character glyph. Transform é to e, ü to u, etc. It would be necessary to 1) detect that the original glyph can't be displayed, and 2) map the undisplayable glyph to a displayable one.
BMagnu commentedon Dec 27, 2020
For general text, I'd agree.
Maybe it'll need special handling for keybinds, so that people who bind ü don't get confused, thinking they bound u
dustinspace217 commentedon Nov 18, 2026
I checked this on a current build. It depends on the fonts in use.
The label reads "Trs facile". The original bitmap fonts have no accented letters, so é, è, à and the rest are dropped. With MediaVPs 5.0.3, which runs in Unicode mode with a TrueType font, the game starts fine in French and shows "Très facile" correctly.
Possible fixes:
data/fonts/fr/, which the open Localized voice files, fonts and SCPUI files via language subfolders #8062 makes reliable.Goober5000 commentedon Nov 18, 2026
2, with 1 as a fallback, sounds like a good fit