Skip to content

Error in accentuated character (encoding mismatch ?) #2226

Open

Description

@dseddah

Hi again,

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)

Activity

  1. The-E commented on Jan 6, 2020

    @The-E
    Member

    Bug reports, regardless of how niche a system may be, are always welcome.

  2. added
    general moddingA general feature or issue related to modding capabilities of FSO
    uiA feature or issue specific to the menus portion of the user interface
    and removed
    general moddingA general feature or issue related to modding capabilities of FSO
    on Sep 9, 2020
  3. BMagnu commented on Dec 8, 2020

    @BMagnu
    Member

    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

  4. BMagnu commented on Dec 26, 2020

    @BMagnu
    Member

    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.

  5. Goober5000 commented on Dec 27, 2020

    @Goober5000
    Contributor

    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.

  6. BMagnu commented on Dec 27, 2020

    @BMagnu
    Member

    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

  7. moved this from To Sort to Medium Impact in Issue Managementon Jan 29, 2024
  8. dustinspace217 commented on Nov 18, 2026

    @dustinspace217
    Contributor

    I checked this on a current build. It depends on the fonts in use.

    1. 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.
    2. Start a training mission and click Options (F2) in the briefing.
    3. 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:

    1. 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.
    2. Let translations ship accented bitmap fonts in data/fonts/fr/, which the open Localized voice files, fonts and SCPUI files via language subfolders #8062 makes reliable.
  9. Goober5000 commented on Nov 18, 2026

    @Goober5000
    Contributor

    2, with 1 as a fallback, sounds like a good fit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn issue from unintended consequencesuiA feature or issue specific to the menus portion of the user interface

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions