[Scummvm-devel] Including README translations

Michael Madsen michael at birdiesoft.dk
Sat Jun 25 16:25:39 CEST 2011


> -----Original Message-----
> From: Simon Sawatzki [mailto:SimSaw at gmx.de]
> Sent: Saturday, June 25, 2011 3:30 PM
> To: scummvm-devel at lists.sourceforge.net
> Subject: Re: [Scummvm-devel] Including README translations
> 
> > The files work fine for me, and I don't need the 3 BOM bytes you
> > mentioned to read them properly.
> 
> That's interesting. You get this simply right by double-clicking the file
> in the explorer or do you use "Open file" in Notepad and state that it
> should open as UTF-8?
>    If you really get it opened correctly by just double-clicking, then
> that's interesting. How does it behave with ANSI files then? Are they
> displayed properly too? Does your Notepad version use some heuristic
> methods to find special characters (like German umlaute)? If so, what
> happens if you open a 3 MB text file (or even bigger) and there is only
> one such a character in the middle of the document?

There's a function called IsTextUnicode in the Windows API, which Notepad uses to attempt to guess the encoding (as either UTF-16, UTF-8 or ANSI) when opening a file outside of the Open dialog. I don't know how much of the document it sends through that function.

This has been used since Windows 2000 (excluding, of course, ME), so it's not at all new (and it's also the cause of the now infamous "Bush hid the facts" bug in 2000 and XP).

Michael





More information about the Scummvm-devel mailing list