public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* The C locale
@ 2009-08-30 16:59 Andy Koppe
  2009-08-31  0:53 ` Christopher Faylor
  0 siblings, 1 reply; 51+ messages in thread
From: Andy Koppe @ 2009-08-30 16:59 UTC (permalink / raw)
  To: cygwin

Trying to reply to Tuomo Valkonen's post about locale issues, I got
rather confused about the C locale. The manual and the POSIX standard
say that it supports ASCII only, so in theory anything above 0x7F
should be rejected. In practice though, both Cygwin 1.5 and 1.7 do
support characters above 0x7F in the C locale, which could be quite
useful. Trouble is, they do so rather inconsistenly.

Both in 1.5 and 1.7, the mb conversion functions treat such characters
as ISO-8859-1. In other words, conversion between chars and wchars are
simple casts (except that wchars above 0xFF can't be converted). This
makes some sense.

Filename handling is different though. Cygwin 1.5 translates filenames
according to the system's ANSI codepage. I guess the inconsistency
with the mb functions didn't really matter, as the mb functions were
pretty much useless anyway, and supporting the system codepage was
more important.

So, with Cygwin 1.7, I'd have expected filename handling in the C
locale to either use ISO-8859-1 for consistency with the mb functions,
or the ANSI codepage for compatibility with 1.5. In actual fact
though, it uses UTF-8.

Is this on purpose? If so, shouldn't the multibyte conversions
functions in the C locale use UTF-8 as well?

Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2009-09-29 14:55 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-30 16:59 The C locale Andy Koppe
2009-08-31  0:53 ` Christopher Faylor
2009-09-02  6:29   ` Andy Koppe
2009-09-02 11:48     ` Eric Blake
2009-09-02 20:10       ` Andy Koppe
2009-09-02 13:56     ` IWAMURO Motonori
2009-09-07 20:08       ` Andy Koppe
2009-09-08 19:35         ` Corinna Vinschen
2009-09-08 20:48           ` Andy Koppe
2009-09-08 21:49           ` Andy Koppe
2009-09-21 10:38             ` Corinna Vinschen
2009-09-21 13:08               ` Lapo Luchini
2009-09-21 14:39               ` Charles Wilson
2009-09-21 21:20               ` Andy Koppe
2009-09-22  5:59                 ` Lapo Luchini
2009-09-22  6:23                   ` Lapo Luchini
2009-09-22  6:50                     ` Andy Koppe
2009-09-22  6:47                   ` Andy Koppe
2009-09-22  8:43                     ` Lapo Luchini
2009-09-22 12:50                       ` Andy Koppe
2009-09-22 16:26                         ` Lapo Luchini
2009-09-22 16:49                           ` Mark J. Reed
2009-09-22 17:04                             ` Lapo Luchini
2009-09-22 22:11                           ` Thorsten Kampe
2009-09-23  5:12                             ` Lapo Luchini
2009-09-23  9:04                               ` Thorsten Kampe
2009-09-23 10:48                                 ` Lapo Luchini
2009-09-23 12:04                                   ` Andy Koppe
2009-09-23 15:16                                     ` Mark J. Reed
2009-09-24  7:58                                   ` Thorsten Kampe
2009-09-24  7:03                 ` IWAMURO Motonori
2009-09-24  7:34                   ` Corinna Vinschen
2009-09-24  9:39                     ` IWAMURO Motonori
2009-09-24  9:57                       ` Corinna Vinschen
2009-09-24 10:00                         ` Corinna Vinschen
2009-09-26  9:15                           ` Corinna Vinschen
2009-09-27  3:21                             ` IWAMURO Motonori
2009-09-28 16:03                               ` IWAMURO Motonori
2009-09-28 16:16                                 ` Corinna Vinschen
2009-09-29  0:23                                   ` wynfield
2009-09-29  4:04                                     ` Andy Koppe
2009-09-29 13:55                                     ` IWAMURO Motonori
2009-09-29  4:27                                   ` Andy Koppe
2009-09-29  7:03                                     ` Corinna Vinschen
2009-09-29 10:55                                   ` Lapo Luchini
2009-09-29 11:12                                   ` Thomas Wolff
2009-09-29 12:12                                     ` Corinna Vinschen
2009-09-29 14:30                                       ` IWAMURO Motonori
2009-09-29 14:13                                   ` IWAMURO Motonori
2009-09-29 14:55                                     ` Corinna Vinschen
2009-09-27  3:44                         ` IWAMURO Motonori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).