[Scummvm-devel] Using non-ascii characters in our source, and in filenames

Marcus Comstedt marcus at mc.pp.se
Sun Mar 19 09:43:02 CET 2006


Max Horn <max at quendi.de> writes:

[...]
> Secondly, an UTF-8 encoding is used for the name. But currently we do
> not at all specify how to handle non-ASCII filenames in any of our
> APIs. Hence that snippet above will work IF AND ONLY IF the
> underlying file API (fopen, stat etc.) happens to use the UTF-8
> encoding, too. Which may or may not be the case.

Dude, that is not UTF-8.  As far as I can tell, it is Windows-1252
(Microsoft's own version of ISO-8859-1)...


> The first issue is easily resolved by doing the "right thing" -- by
> encoding the offending characters using C-style escape sequences,
> i.e. using octal or hexadecimal escape sequences. The above could be
> rewritten as:
>     "T\xF6\xff-T\xF6\xff\x99 Zoo Demo"

But then the game's name would be "Töÿ-Töÿ<tm> Zoo Demo".  Don't
confuse the letter "f" with the digit "f".  :-)


  // Marcus






More information about the Scummvm-devel mailing list