Skip to content

Handle UI texts as Unicode#69

Merged
slouken merged 1 commit into
libsdl-org:mainfrom
pinotree:ui-unicode
May 19, 2026
Merged

Handle UI texts as Unicode#69
slouken merged 1 commit into
libsdl-org:mainfrom
pinotree:ui-unicode

Conversation

@pinotree

@pinotree pinotree commented May 7, 2026

Copy link
Copy Markdown
Contributor

The text rendering code so far assumed all the characters can be represented each in a single byte. This means that the "COPYRIGHT SIGN" character in two UI definitions is encoded as ISO-8859.

Tweak a bit the handling of the text, using SDL APIs to iterate through the codepoints as such (rather than byte by byte). While it works, it is still limited by the availability of characters in the fonts, which will likely not have anything more than what available in ISO-8859.

As result, Data/UI/main.xml can be converted to UTF-8:

  $ iconv -f ISO-8859-15 -t UTF-8 -o Data/UI/main.xml Data/UI/main.xml

Comment thread maclib/Mac_FontServ.cpp Outdated
The text rendering code so far assumed all the characters can be
represented each in a single byte. This means that the "COPYRIGHT SIGN"
character in two UI definitions is encoded as ISO-8859.

Tweak a bit the handling of the text, using SDL APIs to iterate through
the codepoints as such (rather than byte by byte). While it works, it is
still limited by the availability of characters in the fonts, which will
likely not have anything more than what available in ISO-8859.

As result, Data/UI/main.xml can be converted to UTF-8:
  $ iconv -f ISO-8859-15 -t UTF-8 -o Data/UI/main.xml Data/UI/main.xml
@slouken slouken merged commit c87a264 into libsdl-org:main May 19, 2026
3 checks passed
@slouken

slouken commented May 19, 2026

Copy link
Copy Markdown
Contributor

Merged, thanks!

@pinotree pinotree deleted the ui-unicode branch May 19, 2026 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants