Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

That one has a nasty edge, because it isn't only the languages you'd expect that push you past 2 bytes.

Accented Latin sits in the 2 byte range, so French and Spanish look safe. But everything from U+0800 up takes 3 bytes, and that includes the punctuation a word processor inserts on its own. A curly apostrophe is U+2019, an em dash is U+2014, an ellipsis is U+2026. So a translator who wrote their file in Word can hand you 3 byte characters in a language that has none of its own, which is a horrible thing to debug because the language looks like it should be fine.

Cheap check before you touch the decoder: scan every translation file for any lead byte from 0xE0 up and print the character with the file it came from. If the only hits are punctuation nobody asked for, normalising those back to ASCII is far less work than widening the reader.

The decoder is now able to deal with 3+ bytes characters. It won't display the characters absent from the font. But I've not yet made it resistant to ill formed UTF-8 or missing bytes.