Thread: Another locale test program
Regarding the encoding/locale matching issue, here's another test routine I would like you to run if you want to see your operating system supported. It reflects more accurately the actual implementation I'm working on. Compile the attached test program and then run for x in `locale -a`; do LC_ALL=$x ./test; done | sort -u If you don't have a locale command, maybe something like this will work: for x in `ls /usr/share/locale`; do LC_ALL=`basename $x` ./test; done | sort -u I already have Linux and FreeBSD covered. Thanks. (If the program doesn't compile or misbehaves, that would be useful information as well.) -- Peter Eisentraut http://developer.postgresql.org/~petere/
Peter Eisentraut <peter_e@gmx.net> writes: > Regarding the encoding/locale matching issue, here's another test > routine I would like you to run if you want to see your operating > system supported. Oh, disregard previous complaint then... On HPUX 10.20 I get --snip-- SJIS arabic8 big5 ccdc eucJP eucKR eucTW greek8 hebrew8 hp15CN iso88591 iso885915 iso88592 iso88595 iso88596 iso88597 iso88598 iso88599 kana8 roman8 tis620 turkish8 utf8 --snip-- On Mac OS X 10.3.4, there doesn't seem to be a "locale" program. Using the ls /usr/share/locale technique, I get --snip-- Big5 CP1251 CP866 ISCII-DEV ISO8859-1 ISO8859-13 ISO8859-15 ISO8859-2 ISO8859-4 ISO8859-5 ISO8859-7 ISO8859-9 KOI8-R KOI8-U SJIS US-ASCII UTF-8 eucCN eucJP eucKR --snip-- Note the blank line in there! It appears that the CODESET routine is simply emitting the last part of the locale name, as the output works out like this: locale CODESET ... de_AT de_AT.ISO8859-1 ISO8859-1 de_AT.ISO8859-15 ISO8859-15 de_AT.UTF-8 UTF-8 de_CH ... In short it looks like this is going to be a bit limited on OSX :-( regards, tom lane
Hi Peter, > Compile the attached test program and then run > It doesn't even compile in a OpenBSD box. The langinfo.h doesn't have 'CODESET' symbol. > for x in `locale -a`; do LC_ALL=$x ./test; done | sort -u > OpenBSD doesn't support locale at all (correct me if I'm wrong). > If you don't have a locale command, maybe something like this will work: > > for x in `ls /usr/share/locale`; do LC_ALL=`basename $x` ./test; done | > sort -u > We do have nothing in /usr/share/locale -- Euler Taveira de Oliveira euler (at) ufgnet.ufg.br Desenvolvedor Web e Administrador de Sistemas UFGNet - Universidade Federal de Goiás