Opened 9 years ago

Closed 9 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


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)

zgi-win.017 (22.4 KB ) - added by eriktorbjorn 9 years ago.
utf32.txt (3.3 KB ) - added by eriktorbjorn 9 years ago.

Download all attachments as: .zip

Change History (6)

by eriktorbjorn, 9 years ago

Attachment: zgi-win.017 added

comment:1 by eriktorbjorn, 9 years ago

I forgot to attach a savegame. (And apparently I can't do that without writing a comment.)

by eriktorbjorn, 9 years ago

Attachment: utf32.txt added

comment:2 by eriktorbjorn, 9 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 eriktorbjorn, 9 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 eriktorbjorn, 9 years ago

Owner: set to eriktorbjorn
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.