delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/05/13/23:58:39

From: sos AT prospect DOT com DOT ru (Sergey Okhapkin)
Subject: RE: Reason for SetFileApisToOEM call in dcrt0.cc?
13 May 1998 23:58:39 -0700 :
Message-ID: <01BD7F26.1822A390.cygnus.cygwin32.developers@drs>
To: "cygwin32-developers AT cygnus DOT com" <cygwin32-developers AT cygnus DOT com>,
"'Geoffrey Noer'" <noer AT cygnus DOT com>

Geoffrey Noer wrote:
> Do any of you understand why SetFileApisToOEM is called in dcrt0.cc
> (dll_crt0_1)???  I don't.  Reading the MSDN info for the function

This was my addition. Like any american guy you'll never understand the 
problem :-) Because of console i/o works in oem codepage, user enters 
oem-coded filenames on bash prompt, for example. Without SetFileApisToOEM 
call file calls (like CreateFile) thinks that ansi-coded filenames are 
given. So,
"cat >filename" will create a file with a different name! Oem and ansi 
codings are very different for Russian language, for example. Of course, 
the best solution is to use unicode charset. ...When Windows95 will die or 
when it will support it :-)

Here in Russia OEM charset is CP-866, Ansi charset CP-1251, and KOI-8R on 
unix boxes :-)

--
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019