Re: [GENERAL] trouble with to_char('L')

2010-02-27 Thread Bruce Momjian
Hiroshi Inoue wrote: Bruce Momjian wrote: Hiroshi Inoue wrote: Bruce Momjian wrote: Where are we on this issue? Oops I forgot it completely. I have a little improved version and would post it tonight. Ah, very good. Thanks. Attached is an improved version. FYI, I am working on

Re: [GENERAL] trouble with to_char('L')

2010-02-26 Thread Hiroshi Inoue
Bruce Momjian wrote: Hiroshi Inoue wrote: Bruce Momjian wrote: Where are we on this issue? Oops I forgot it completely. I have a little improved version and would post it tonight. Ah, very good. Thanks. Attached is an improved version. regards, Hiroshi Inoue ? formatting.patch ?

Re: [GENERAL] trouble with to_char('L')

2010-02-25 Thread Bruce Momjian
Where are we on this issue? --- Hiroshi Inoue wrote: Tom Lane wrote: Alvaro Herrera alvhe...@commandprompt.com writes: Does this imply that we shouldn't allow UTF8 database on Windows at all? That would be pretty

Re: [GENERAL] trouble with to_char('L')

2010-02-25 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Where are we on this issue? According to my files, I complained about the extreme ugliness of the patch (redefining strdup for pete's sake) and the fact that it did not actually do things anything like the LC_TIME code as was claimed. Hiroshi rejected those

Re: [GENERAL] trouble with to_char('L')

2010-02-25 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Where are we on this issue? According to my files, I complained about the extreme ugliness of the patch (redefining strdup for pete's sake) and the fact that it did not actually do things anything like the LC_TIME code as was claimed.

Re: [GENERAL] trouble with to_char('L')

2010-02-25 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Right, but you are saying it is still an open issue, which says we should look at it. Sure. Maybe put it on TODO? regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] trouble with to_char('L')

2010-02-25 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Right, but you are saying it is still an open issue, which says we should look at it. Sure. Maybe put it on TODO? OK, TODO is: Fix locale-aware handling (e.g. monetary) for specific server/client encoding

Re: [GENERAL] trouble with to_char('L')

2010-02-25 Thread Hiroshi Inoue
Bruce Momjian wrote: Where are we on this issue? Oops I forgot it completely. I have a little improved version and would post it tonight. regards, Hiroshi Inoue --- Hiroshi Inoue wrote: Tom Lane wrote: Alvaro

Re: [GENERAL] trouble with to_char('L')

2010-02-25 Thread Bruce Momjian
Hiroshi Inoue wrote: Bruce Momjian wrote: Where are we on this issue? Oops I forgot it completely. I have a little improved version and would post it tonight. Ah, very good. Thanks. -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB

Re: [GENERAL] trouble with to_char('L')

2009-04-22 Thread Mikko
On Wed, Apr 22, 2009 at 2:13 AM, Alvaro Herrera alvhe...@commandprompt.com wrote: Ouch ... I thought that was the way that Windows designated UTF8 locales, but maybe I am wrong. Ok, now I found out that Windows doesn't support locales with encoding using more than two bytes per character and

Re: [GENERAL] trouble with to_char('L')

2009-04-22 Thread Alvaro Herrera
Mikko escribió: On Wed, Apr 22, 2009 at 2:13 AM, Alvaro Herrera alvhe...@commandprompt.com wrote: Ouch ... I thought that was the way that Windows designated UTF8 locales, but maybe I am wrong. Ok, now I found out that Windows doesn't support locales with encoding using more than two

Re: [GENERAL] trouble with to_char('L')

2009-04-22 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Does this imply that we shouldn't allow UTF8 database on Windows at all? That would be pretty unfortunate :-( I think what this suggests is that there probably needs to be some encoding conversion logic near the places we examine localeconv()

Re: [GENERAL] trouble with to_char('L')

2009-04-22 Thread Hiroshi Inoue
Tom Lane wrote: Alvaro Herrera alvhe...@commandprompt.com writes: Does this imply that we shouldn't allow UTF8 database on Windows at all? That would be pretty unfortunate :-( I think what this suggests is that there probably needs to be some encoding conversion logic near the places we

Re: [GENERAL] trouble with to_char('L')

2009-04-21 Thread Albe Laurenz
Mikko wrote: my database has UTF8 encoding and Finnish locale, the client_encoding and the console is set to WIN1252. I created a table with a single NUMERIC(5,2) column and inserted a few values. Running a query 'SELECT to_char(money, '999D99L') FROM table' through psql gives the following

Re: [GENERAL] trouble with to_char('L')

2009-04-21 Thread Mikko
psql (PostgreSQL) 8.3.7 server_version 8.3.7 server_encoding UTF8 client_encoding win1252 lc_numeric Finnish, Finland lc_monetary Finnish, Finland testdb=# SELECT to_char(3.1415::numeric(5,2), '999D99L'); ERROR: invalid byte sequence for encoding UTF8: 0x80 HINT: This error can also happen if

Re: [GENERAL] trouble with to_char('L')

2009-04-21 Thread Alvaro Herrera
Mikko escribió: psql (PostgreSQL) 8.3.7 server_version 8.3.7 server_encoding UTF8 client_encoding win1252 lc_numeric Finnish, Finland lc_monetary Finnish, Finland testdb=# SELECT to_char(3.1415::numeric(5,2), '999D99L'); ERROR: invalid byte sequence for encoding UTF8: 0x80 HINT:

Re: [GENERAL] trouble with to_char('L')

2009-04-21 Thread Mikko
On Tue, Apr 21, 2009 at 8:13 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Maybe the problem here is that the chosen locales are not UTF8.  Does it work if you set lc_numeric and lc_monetary to Finnish_Finland.65001 instead?  Those should match the server_encoding. alter database testdb

Re: [GENERAL] trouble with to_char('L')

2009-04-21 Thread Alvaro Herrera
Mikko escribió: On Tue, Apr 21, 2009 at 8:13 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Maybe the problem here is that the chosen locales are not UTF8.  Does it work if you set lc_numeric and lc_monetary to Finnish_Finland.65001 instead?  Those should match the server_encoding.

[GENERAL] trouble with to_char('L')

2009-04-20 Thread Mikko
Hi, my database has UTF8 encoding and Finnish locale, the client_encoding and the console is set to WIN1252. I created a table with a single NUMERIC(5,2) column and inserted a few values. Running a query 'SELECT to_char(money, '999D99L') FROM table' through psql gives the following error message: