X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: Thu, 8 Apr 2004 12:40:15 -0500 From: Bob Poortinga To: djgpp AT delorie DOT com Subject: Help with codepages/character sets Message-ID: <20040408124015.A19109@webster.tsc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.15i Restrict: no-external-archive X-No-Archive: yes Reply-To: djgpp AT delorie DOT com Is there any method available to use Codepage 1252 (Windows-1252) or the ISO-8859-1 charset in a program compiled and linked with DJGPP? The programs I'm working on decode a filename from a data file (generated with CP1252) and open a file with the decoded filename as part of the filename passed to fopen(). fopen() at this point is using CP437 to open the file which creates a mismatch in the filename. The problem child in this scenario is the slashed zero (CP1252 = 0xD8) which does not exist in CP437. I've google'd myself silly trying to find a solution. I've tried the locale library which doesn't seem to support it. Is there a reasonable way to do this without resorting to writing my own translator? BTW, the reason I'm using DJGPP is because of execution speed. The version of my decoder compiled with DJGPP gcc 3.3 runs over 2 times faster than the version compiled with M$ C++ 6.0 and runs 10%-20% faster than Cygwin. However, neither the M$ version nor the Cygwin version suffer from this codepage problem. -- Bob Poortinga K9SQL Technology Service Corp. Bloomington, Indiana US