Skip site navigation (1) Skip section navigation (2)

Day and month name localization uses wrong locale category

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Day and month name localization uses wrong locale category
Date: 2006-11-17 16:40:15
Message-ID: 200611171740.16235.peter_e@gmx.net (view raw or flat)
Thread:
Lists: pgsql-hackers
In 8.2, utils/adt/formatting.c uses our NLS mechanism to localize day and 
month names (I assume for use by to_char).  But since this necessarily ties 
the outcome to the LC_MESSAGES setting, this comes out inconsistently with 
Unix locale behavior, e.g.,

pei(at)bell:~$ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

pei(at)bell:~$ date +%A
Friday

pei(at)bell:~$ LC_MESSAGES=de_DE(at)euro date +%A
Friday

pei(at)bell:~$ LC_TIME=de_DE(at)euro date +%A
Freitag

Is there no API to get the localized names from the C library so that LC_TIME 
takes effect?

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2006-11-17 16:44:42
Subject: Localization of abbreviated day names
Previous:From: Bruce MomjianDate: 2006-11-17 16:39:19
Subject: Re: [PATCHES] replication docs: split single vs.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group