This is the mail archive of the cygwin 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: [1.7] Proposal: the filename encoding in C locale uses UTF-8 instead of SO/UTF-8

On May 14 23:06, IWAMURO Motonori wrote:
> 2009/5/14 Corinna Vinschen <>:
> > I see a couple of potential problems.
> What problems are those?

I have no example off-hand.  When I thought about it I always got sick
thinking about scenarios where the library is using, say, UTF-8, and the
application is using SJIS, and what happens to the filenames in this
case.  In theory the lib should provide what the application thinks it

> > And have some time to discuss whether these are something the
> > user can or even should fix or workaround alone.
> I think that the application that use locale by the environment
> variable and the application that use no locale should be able to read
> and write the same byte sequence.

Ok, you got as point there.  Assuming we leave out any application
which deliberately uses a non-"C" locale which differs from the setting
in the environment.  Then we're getting into trouble.

If Cygwin uses internally always the environment setting, we have a
valid, identical byte stream for all applications using
setlocale(LC_ALL, ""), *and* for non locale-aware applications.

But if the application uses a deliberately different setting via
setlocale, ..., hmm.  It should get what it asks for.

Maybe, you're right.  I have to test this a bit.

Thanks for your input,

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

Unsubscribe info:
Problem reports:

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