guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: i18n issues on NetBSD


From: Ludovic Courtès
Subject: Re: i18n issues on NetBSD
Date: Wed, 12 Aug 2009 00:58:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Greg Troxel <address@hidden> writes:

> scheme@(guile-user)> (setlocale LC_ALL "does-not-exist")  
> "C"

This looks wrong to me:

  Upon successful completion, setlocale() shall return the string
  associated with the specified category for the new locale.  Otherwise,
  setlocale() shall return a null pointer and the locale of the process
  is not changed.

  http://www.opengroup.org/onlinepubs/9699919799/functions/setlocale.html

Here we do not expect "successful completion", so it "shall return a
null pointer".

Can you submit a bug report against NetBSD's C library?

> list gdt 8 ~ > cat l.c
> #include <langinfo.h>
> #include <nl_types.h>
> #include <locale.h>
>
> #include <stdio.h>
> #include <assert.h>
>
>
> int
> main (int argc, char *argv[])
> {
>   char *s;
>
>   s = setlocale (LC_ALL, "C");
>   assert (s != NULL);
>
>   printf ("DAY_1: %s\n", nl_langinfo (DAY_1));
>
>   s = setlocale (LC_ALL, "en_GB");
>   assert (s != NULL);
>
>   printf ("DAY_1: %s\n", nl_langinfo (DAY_1));
>
>   return 0;
> }
> list gdt 9 ~ > cc -o l l.c
> list gdt 10 ~ > ./l
> DAY_1: Sun
> DAY_1: Sun

Both look wrong to me: it returns the abbreviated name of the day
instead of the full name of the day
(http://www.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html).

Can you report a bug for this one, too?

Thanks,
Ludo'.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]