This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "C" character set (again)



First of all, Happy New Year to all of you!


On Dec 29 14:11, Andy Koppe wrote:
> 2009/12/29 Eric Blake:
> >> Following the "printf treats differently a string constant and a
> >> character array" issue at
> >> http://cygwin.com/ml/cygwin/2009-12/msg01009.html, I'm wondering again
> >> whether the "C" locale shouldn't go back to using ASCII rather than
> >> UTF-8, to avoid surprises like that and also to fit with many people's
> >> expectation that "C" means ASCII. I think that would save us a bunch
> >> of trouble and pointless legal/religious discussions about the C
> >> locale.
> >
> > Bytes with the 8th bit set are not portable in the C locale, regardless of
> > whether that locale uses ASCII or UTF-8 encoding. ?Yes, we will have to
> > field complaints from users with non-portable programs. But I don't think
> > we have to change back to ASCII - we are doing those users a service by
> > making them fix their portability bugs.
> 
> Trouble is, Cygwin currently is the only significant platform where
> plain "C" implies UTF-8, as far as I know anyway. While I agree that
> POSIX does allow it, this does make it more of a Cygwin problem than a
> portability problem from the user's perspective, and they are
> certainly not going to thank us for that in any case.
> [...]
> I'm running Cygwin with the patch posted above right now, and things
> are working fine. Everything that cares about charsets uses UTF-8 as
> before, as do the filesystem, the console, and also the conversion of
> the initial environment. The difference is that worries about 8-bit
> cleanness in programs that don't call setlocale or that explicitly set
> the C locale go away.

I'm still not convinced that C == C.ASCII is really such a good idea for
us.  What other conversion problems are waiting right around the bend?
Shouldn't we rather try to fix some of the issues which show up on the
list?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]