Opened 10 years ago
Closed 10 years ago
#6772 closed defect (fixed)
ZVISION: Wrong characters in subtitles (Unicode issue?)
Reported by: | eriktorbjorn | Owned by: | eriktorbjorn |
---|---|---|---|
Priority: | normal | Component: | Engine: ZVision |
Version: | Keywords: | ||
Cc: | Game: | Zork Grand Inquisitor |
Description
Current Git snapshot of ScummVM, English version of the game.
After opening the time tunnel, if I click on it the Dungeon master says "I wouldn't do that if I were you. You're likely to come out puréed on the other side."
However, instead of "puréed" the subtitles say "puréed". I'm pretty sure this is because ZVision converts the strings to UTF-8 when reading them, while our font class expects either a Common::String where each character is one byte, or Common::U32String, i.e. UTF-32.
Ticket imported from: bugs/6772.
Attachments (2)
Change History (6)
by , 10 years ago
Attachment: | zgi-win.017 added |
---|
comment:1 by , 10 years ago
by , 10 years ago
comment:2 by , 10 years ago
One way to work around it would be to convert the UTF-8 data to a Common::U32String before drawing it. I'm attaching a proof-of-concept patch to do so.
This does feel like a bit of a hack though, and I guess the same fix would have to be made to the game over screens. (That's why I made the conversion a separate function, and made it public.) I don't have any test case for that, though.
comment:3 by , 10 years ago
I've committed my change, after discussion with [md5]. It's a bit of a hack, but it seems to be the least painful way of handling it at the moment.
comment:4 by , 10 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
I forgot to attach a savegame. (And apparently I can't do that without writing a comment.)