Opened 15 years ago

Last modified 2 years ago

#2016 new defect

GUI: non-english chars in directory names not supported

Reported by: SF/clemty Owned by:
Priority: low Component: GUI
Keywords: Cc:
Game:

Description

German users have the directory "Startmenü" (start menu) on their system, ScummVM displays the umlaut ü garbled - possibly because no character for that exists, so it just loads random stuff from that memory position.

While this display oddity is surely just a minor annoyance I think it *might* cause problems if you read random data - maybe some really smart OS would detect that as buffer/security problem?

Workaround might be to check for every value >max supported character and replace it by _ or ? or similar in display (not the string itself, or we can't access those dirs anymore :-)

clem

Ticket imported from: #1193732. Ticket imported from: bugs/2016.

Attachments (1)

scummvm-bug.png (6.9 KB ) - added by SF/clemty 15 years ago.
weird display behaviour with directory names containing umlauts

Download all attachments as: .zip

Change History (11)

by SF/clemty, 15 years ago

Attachment: scummvm-bug.png added

weird display behaviour with directory names containing umlauts

comment:1 by SF/clemty, 15 years ago

btw, official ScummVM 0.7.1, Windows XP screenshot attached

comment:2 by fingolfin, 15 years ago

Known issue, and it's more complex than that: the drawing issue is only the tip of the iceberg. Our config file is ASCII, and path names in many modern operating / file systems use unicode (UTF8) for filenames, so you may not even be able to specify the path properly in the config file (well, using UTF8, it *should* be possible to use a UTF8 text editor to modify the config file accordingly, but the GUI won't be able to properly render those paths.

Of course, it still would probably be a good idea to define a special symbol which is drawn whenever a glyph is not present in a given font.

comment:3 by fingolfin, 15 years ago

Summary: non-english chars in directory names not supportedGUI: non-english chars in directory names not supported

comment:4 by fingolfin, 15 years ago

Priority: normallow

comment:5 by fingolfin, 15 years ago

Over here, no garbage is drawn. And in fact, our font renderer already contains checks, chars which are not supported by the font currently are mapped to the space character (I guess mapping them to a special symbol instead might be better).

In my case, the OS gives us UTF8 encoded chars, so the '' is indeed mapped to two bytes in the string; and those two bytes, by chance, happen to be in the range of chars our default font supports, so the '' is drawn as 'u' over here. Annoying but harmless.

comment:6 by sev-, 3 years ago

Component: GUI

comment:7 by bonki, 2 years ago

This held true for the legacy GUI but v1.5.0 introduced support for TTF fonts so I think this is no longer relevant for ports which take advance of this (?).

Which ports still use the old font?

comment:8 by sev-, 2 years ago

It is not about drawing, but also how we deal with strings internally. The required amount of changes is relatively big.

comment:9 by bonki, 2 years ago

I understand that this is about internally handling UTF8-encoded strings (which I gather we don't do) but I just tested this on Windows 10 and it "just works". I can add games in folders containing umlauts, the paths are printed correctly in all parts of the GUI and I can launch the games without problems, even though scummvm.ini itself is not UTF8-encoded.

comment:10 by bonki, 2 years ago

(I'm not saying that this is ideal, just that the symptoms don't seem to show anymore when FreeType2 is enabled)

Note: See TracTickets for help on using tickets.