Locale question
Locale question
От:
lsunley@mb.sympatico.ca
Дата:
Hi I have a few people in Europe trying out the rc1 port for OS/2 and they have run into a problem with the locale settings They have a locale set as de_DE_EURO and the initdb program really does not like this because the setlocale(LC_MESSAGES, NULL) call returns a zero length string. When the postgres code finds that the lc_messages does not = the return from LC_CTYPE it appears to attempt to see if it is a known language setup and something goes wrong. When the local is de_DE everything works fine. Can someone point me to where the locale string is tested to be a known type, or explain how to track down the problem? If I patch initdb to just use the return from LC_CTYPE as the value for lc_messages the init conpletes and the database will start up OK Should I be doing something else to fix this problem? This apparently also happened with the 7.4.x postgres code as well. Thanks Lorne -- ----------------------------------------------------------- lsunley@mb.sympatico.ca -----------------------------------------------------------
Re: Locale question
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
lsunley@mb.sympatico.ca writes: > I have a few people in Europe trying out the rc1 port for OS/2 and they > have run into a problem with the locale settings > They have a locale set as de_DE_EURO and the initdb program really does > not like this because the setlocale(LC_MESSAGES, NULL) call returns a zero > length string. Hm. We've seen occasional reports of this sort of failure on several platforms for some time, but no one's quite figured out what's going on. In fact, no one's yet offered a test case that anyone else could reproduce reliably :-(. My bet is that this isn't an OS/2-specific issue but something centering on particular locale definitions. If you check the archives you will find very similar-looking reports on Mac OS X, and I think on some other platforms too. One idea I'd had is that we know locales are dependent on character set encodings, and so some platforms might reject an LC_MESSAGES (or LC_anything) setting that's not compatible with LC_CTYPE (assuming that that's what the platform takes as the bottom-level encoding spec). I don't have any proof of this though. It would be great to have a reproducible test case on an open-source platform to poke at, because then we could trace through the locale library and figure out exactly what it is unhappy about. OS/2 isn't open source, but maybe if you can determine the *exact* circumstances needed to provoke the problem there, we could transpose them to a platform we can debug better. regards, tom lane