Mail Archives: cygwin/2011/10/04/14:21:33
On Oct 4 20:03, Erwin Waterlander wrote:
> Corinna Vinschen schreef, Op 4-10-2011 16:29:
> >Does it? Even if I'm running a german OS, I absolutely hate to see
> >german diagnostic output from gcc, and I absolutely hate certain
> >programs using non-ASCII chars in output. (In)famous examples are
> >Unicode quoting chars rather than ' or ", or using the Unicode
> >hyphen character rather than -. But that's just me.
>
> You got used to ASCII, like all the old-timers... ;)
> export LANG=C is your solution.
>
> By the way, I noticed that with the default locale C.UTF-8 the
> nl_langinfo(CODESET) C function <langinfo.h> returns wrongly
> "ISO-8859-1",
Not for me:
$ cat > setl.c <<EOF
#include <stdio.h>
#include <locale.h>
#include <langinfo.h>
int main(int argc, char **argv)
{
char *loc;
if (argc > 1)
loc = setlocale (LC_ALL, argv[1]);
else
loc = setlocale (LC_CTYPE, NULL);
printf ("locale: %s charset: %s\n", loc, nl_langinfo (CODESET));
return 0;
}
EOF
$ gcc -o setl setl.c
$ ./setl
locale: C charset: ANSI_X3.4-1968
$ ./setl C
locale: C charset: ANSI_X3.4-1968
$ ./setl C.utf8
locale: C.utf8 charset: UTF-8
$ ./setl C.UTF-8
locale: C.UTF-8 charset: UTF-8
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
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
- Raw text -