[Scummvm-devel] PORTERS: OSystem::setWindowCaption

Max Horn max at quendi.de
Mon Jun 8 23:10:44 CEST 2009


Am 07.06.2009 um 23:56 schrieb Marcus Comstedt:

>
> Max Horn <max at quendi.de> writes:
>

[...]

>
>> 2) (also in reply to Torbjörn's mail) UTF-8 can be easily converted
>> to/ from ASCII, or LATIN-1 (although of course chars not in ASCII /
>> LATIN-1 cannot be translated).
>
> Actually, not so easy as you might think.  A letter like "ä"
> (0xe4 in LATIN-1) can be represented either by the Unicode codepoint
> 0xe4 (which transformed to UTF-8 becomes 0xc3 0xa4), or by the
> sequence 0x61 0x308 (which becomes 0x61 0xcc 0x88 in UTF-8).
> While the first is trivial to convert to LATIN-1, the second one
> isn't.  And I seem to recall that MacOS X has a tendency to use the
> second form.

You are right in that indeed I was a bit hasty: Convertin LATIN-1 to  
UTF-8 is easy, but vice versa is not, at least not if you want to  
cover all cases correctly. So, we could implement a limited back  
conversion that only handles most cases, but not all. *However*, that  
wouldn't be very nice at all.

So, either LATIN-1 or we stay with ASCII. I wonder if any other porter  
has to say anything? Else, I'll just make the required changes when I  
find the time.

Bye,
Max



More information about the Scummvm-devel mailing list