Mail Archives: djgpp/2004/04/08/14:06:13
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
- Raw text -