This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: revised proposal for GCC and non-Ascii source files
- To: eggert at twinsun dot com
- Subject: Re: revised proposal for GCC and non-Ascii source files
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Tue, 29 Dec 1998 10:45:38 +0100
- CC: rms at gnu dot org, zack at rabi dot columbia dot edu, bothner at cygnus dot com, amylaar at cygnus dot co dot uk, gcc2 at gnu dot org, egcs at cygnus dot com
- References: <199812290158.RAA12839@shade.twinsun.com>
> 3. For non-GNUC charsets, GCC uses the compilation host's iconv
> function to determine character boundaries.
How do you do that? Looking at the iconv(3) documentation, I could not
find out how this could work.
Also, how do you detect that you are in ASCII mode in a MBCS encoding?
Consider
void <Escape to JIS X0201>how_many_<yen sign>();<ESCAPE to ASCII>
IMHO, this is illegal: the parens after the function name are not
ASCII characters. However, iconv (and mblen) will tell us that the
character has a single byte, and it will look like ASCII '('.
Regards,
Martin