www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/03/07/15:32:49

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Date: Tue, 7 Mar 2000 15:32:35 -0500
Message-Id: <200003072032.PAA15188@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: schilling AT fokus DOT gmd DOT de
CC: cygwin-developers AT sourceware DOT cygnus DOT com
In-reply-to: <200003072022.VAA25434@fokus.gmd.de> (message from Joerg
Schilling on Tue, 7 Mar 2000 21:22:46 +0100 (MET))
Subject: Re: Character sets in win32 and cygwin
References: <200003072022 DOT VAA25434 AT fokus DOT gmd DOT de>

> 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 ();

- Raw text -


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