cygwin-developers Digest 9 Mar 2000 01:38:57 -0000 Issue 203

434559@ingta.unizar.es 434559@ingta.unizar.es
Thu Mar 9 06:28:00 GMT 2000


--ehgcmnbkckmlmchnmdfa

cygwin-developers Digest 9 Mar 2000 01:38:57 -0000 Issue 203

Topics (messages 1237 through 1239):

Character sets in win32 and cygwin
        1237 by: Joerg Schilling <schilling@fokus.gmd.de>
        1238 by: DJ Delorie <dj@delorie.com>

[dj@delorie.com: next net release preview]
        1239 by: DJ Delorie <dj@delorie.com>

Administrivia:

To subscribe to the digest, e-mail:
        cygwin-developers-digest-subscribe@sourceware.cygnus.com

To unsubscribe from the digest, e-mail:
        cygwin-developers-digest-unsubscribe@sourceware.cygnus.com

To post to the list, e-mail:
        cygwin-developers@sourceware.cygnus.com


----------------------------------------------------------------------

--ehgcmnbkckmlmchnmdfa
Content-Type: message/rfc822
Content-Disposition: inline; filename="cygwin-developers.1237"

Date: Tue, 7 Mar 2000 21:22:46 +0100 (MET)
From: Joerg Schilling <schilling@fokus.gmd.de>
Message-Id: < 200003072022.VAA25434@fokus.gmd.de >
To: cygwin-developers@sourceware.cygnus.com
Subject: Re: Character sets in win32 and cygwin

>From: DJ Delorie <dj@delorie.com>

>> While I do want cygwin to be as robust as possible, it is not likely that
>> I (or DJ, I assume) will have enough time to investigate something that
>> takes as much setup as this seems to entail.

>I'll trade.  I'll spend more time on random cygwin things, if someone
>else volunteers to paint my house.

Agreed: Nice idea, so you probably like to clean my rooms to give me
some more minutes to work on open source software ;- I am working my
whole free time on CD-recording. I have no extra time to debug software
from other people.

Some other notes:

-       The problem may be observed with the German versions of Win95
        and WNT.

-       cdrecord -version prints on Solaris:

        Cdrecord-ProDVD 1.8 (sparc-sun-solaris2.4) Copyright (C) 1995-2000
J–rg Schilling

        The same source compiled on Cygwin prints:

        Cdrecord-ProDVD 1.8 (i586-pc-cygwin) Copyright (C) 1995-2000 J—rg
Schilling

>From a German CD recording news group, I got the information
that UNICODE is transferred into the "OEM" charater set for DOS box
applications. If this is true for cygwin too, cygwin will not be usable with
character sets bejond 7 bit ASCII as the code pages are different and not
visible from a POSIX application.

Here is what I got in addition:

die Referenz sagt:

Console Code Pages

"A code page is a mapping of 256 character codes to individual
characters. Different code pages include different special characters,
typically customized for a language or a group of languages.

Associated with each console are two code pages: one for input and one
for output."



Console Application Issues

"The 8-bit console functions use the OEM code page. All other
functions use the ANSI code page by default. This means that strings
returned by the console functions may not be processed correctly by
the other functions and vice versa. For example, if FindFirstFileA
returns a string that contains certain extended ANSI characters,
WriteConsoleA will not display the string properly.

The best long-term solution for a console application is to use
Unicode. Barring that solution, a console application should use the
SetFileApisToOEM function. That function changes relevant Win32 file
functions so that they produce OEM character set strings rather than
ANSI character set strings. "




und damit darf der programmierer raten was jetzt 8-bit concole
functions sind, was mit Unicode laeuft und was mit SetFileApisToOEM
umgestellt werden kann.

J–rg

 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) J–rg Schilling D-13353 Berlin
       js@cs.tu-berlin.de               (uni)  If you don't have iso-8859-1
       schilling@fokus.gmd.de           (work) chars I am J"org Schilling
 URL:  http://www.fokus.gmd.de/usr/schilling   ftp://ftp.fokus.gmd.de/pub/unix

--ehgcmnbkckmlmchnmdfa
Content-Type: message/rfc822
Content-Disposition: inline; filename="cygwin-developers.1238"

Date: Tue, 7 Mar 2000 15:32:35 -0500
Message-Id: < 200003072032.PAA15188@envy.delorie.com >
From: DJ Delorie <dj@delorie.com>
To: schilling@fokus.gmd.de
CC: cygwin-developers@sourceware.cygnus.com
Subject: Re: Character sets in win32 and cygwin


> The best long-term solution for a console application is to use
> Unicode. Barring that solution, a console application should use the
> SetFileApisToOEM function. That function changes relevant Win32 file
> functions so that they produce OEM character set strings rather than
> ANSI character set strings. "

You mean like this?

  /* If we didn't call SetFileApisToOEM, console I/O calls would use a
     different codepage than other Win32 API calls.  In some languages
     (not English), this would result in "cat > filename" creating a file
     by a different name than if CreateFile was used to create filename.
     SetFileApisToOEM prevents this problem by making all calls use the
     OEM codepage. */

  SetFileApisToOEM ();

--ehgcmnbkckmlmchnmdfa
Content-Type: message/rfc822
Content-Disposition: inline; filename="cygwin-developers.1239"

Date: Wed, 8 Mar 2000 20:38:47 -0500
Message-Id: < 200003090138.UAA28445@envy.delorie.com >
From: DJ Delorie <dj@delorie.com>
To: cygwin-developers@sourceware.cygnus.com
Subject: [dj@delorie.com: next net release preview]


Any compelling reasons?

------- Start of forwarded message -------
If I don't get any compelling reasons not to release this, it will
become the next net release (and the basis for future updates) as of,
say, March 6th 2000 (a week and a half from now).
------- End of forwarded message -------

--ehgcmnbkckmlmchnmdfa--




More information about the Cygwin-developers mailing list