Re: [HACKERS] Rough draft for Unicode-aware UPPER()/LOWER()/INITCAP()

2004-05-19 Thread Tom Lane
Marko Karppinen <[EMAIL PROTECTED]> writes: > I think this interaction between the locale and server_encoding is > confusing. Is there any use case for running an incompatible mix? In hindsight we should probably not have invented per-database encoding selection, since it's so fragile to use in co

Re: [HACKERS] Rough draft for Unicode-aware UPPER()/LOWER()/INITCAP()

2004-05-17 Thread Marko Karppinen
Tatsuo Ishii wrote: initdb could even emit a warning if the --encoding option was used without also specifying --no-locale. Please don't do that. Most Asian chasets does not work with locale enabled PostgreSQL installation. i.e. it returns WRONG SELECT results. I've been telling this to Japanese us

Re: [HACKERS] Rough draft for Unicode-aware

2004-05-16 Thread Tatsuo Ishii
> initdb could even emit a warning if the --encoding option was > used without also specifying --no-locale. Please don't do that. Most Asian chasets does not work with locale enabled PostgreSQL installation. i.e. it returns WRONG SELECT results. I've been telling this to Japanese users for hundred

Re: [HACKERS] Rough draft for Unicode-aware UPPER()/LOWER()/INITCAP()

2004-05-16 Thread Marko Karppinen
Marko Karppinen wrote: I think this interaction between the locale and server_encoding is confusing. Is there any use case for running an incompatible mix? If not, would it not make sense to fetch initdb's default database encoding with nl_langinfo(CODESET) instead of using SQL_ASCII? Peter Eisentr

Re: [HACKERS] Rough draft for Unicode-aware UPPER()/LOWER()/INITCAP()

2004-05-16 Thread Peter Eisentraut
Marko Karppinen wrote: > I think this interaction between the locale and server_encoding is > confusing. Is there any use case for running an incompatible mix? > If not, would it not make sense to fetch initdb's default database > encoding with nl_langinfo(CODESET) instead of using SQL_ASCII? This

Re: [HACKERS] Rough draft for Unicode-aware UPPER()/LOWER()/INITCAP()

2004-05-16 Thread Marko Karppinen
Tom Lane wrote: This code will only work if the database is running under an LC_CTYPE setting that implies the same encoding specified by server_encoding. However, I don't see that as a fatal objection, because in point of fact the existing upper/lower code assumes the same thing. I think this int

Re: [HACKERS] Rough draft for Unicode-aware

2004-05-14 Thread Markus Bertheau
Ð ÐÑÐ, 13.05.2004, Ð 04:42, Tom Lane ÐÐÑÐÑ: > But if you have a platform that has mbstowcs and > friends, please try it and let me know about any portability gotchas > you see. I can't test it because with a clean 7.4.2 with the patch applied I get [EMAIL PROTECTED] postgresql-7.4.2]$ LANG=C make

Re: [HACKERS] Rough draft for Unicode-aware UPPER()/LOWER()/INITCAP()

2004-05-13 Thread Jean-Michel POURE
Le jeudi 13 Mai 2004 04:42, Tom Lane a Ãcrit : > I got tired of reading complaints about how upper/lower don't work with > Unicode, so I went and prototyped a solution. ÂThe attached code uses > the C99-standard functions mbstowcs and wcstombs to convert to and from > a "wchar_t[]" representation t