[Top][All Lists]

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

i18n issues on NetBSD

From: Ludovic Courtès
Subject: i18n issues on NetBSD
Date: Tue, 11 Aug 2009 21:10:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Greg Troxel <address@hidden> writes:

> scheme@(guile-user)> (make-locale LC_ALL "does-not-exist")
> #<locale 7f7ffc1d9ca0>

And `(setlocale LC_ALL "does-not-exist")'?

It looks like setlocale(3) doesn't behave as specified by POSIX

> scheme@(guile-user)> (map locale-day (map 1+ (iota 7)))
> ("Sun" "Mon" "Tue" "Wed" "Thu" "Fri" "Sat")

It looks like `(nl-langinfo DAY_1)' doesn't DTRT per .

Just to make sure, can you try this program (assume the `en_GB' locale
is available):

--8<---------------cut here---------------start------------->8---
#include <langinfo.h>
#include <nl_types.h>
#include <locale.h>

#include <stdio.h>
#include <assert.h>

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;
--8<---------------cut here---------------end--------------->8---

> ERROR: In procedure string->date:
> ERROR: TIME-ERROR type bad-date-template-string: ("Invalid string for " 
> #<program priv:locale-long-weekday->index (string)>)

This is actually the same problem.


reply via email to

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