Re: BUG #5801: characters not encoded properly for column names - Mailing list pgsql-bugs
From | Marc Cousin |
---|---|
Subject | Re: BUG #5801: characters not encoded properly for column names |
Date | |
Msg-id | 201012231134.47840.cousinmarc@gmail.com Whole thread Raw |
In response to | Re: BUG #5801: characters not encoded properly for column names (Pavel Stehule <pavel.stehule@gmail.com>) |
Responses |
Re: BUG #5801: characters not encoded properly for column
names
|
List | pgsql-bugs |
No, from a Linux psql client (inside a kde konsole). You can setup any char= set=20 in it. I have exactly the same behaviour with psql under windows anyway, wi= th=20 a chcp 1252 in the cmd console. It's not a console charset problem, I've=20 tripled checked that :) And anyway, this character shouldn't get into the database as UTF8, as it i= s=20 1252 (hence the error message). The Thursday 23 December 2010 11:24:21, Pavel Stehule wrote : > Hello Marc, >=20 > It was entered from a windows cmd console? It doesn't use win > encodings as default. For example, it must be executed with parameter > /c chcp 1250 for win1250 encoding. >=20 > Regards >=20 > Pavel Stehule >=20 > 2010/12/23 Marc Cousin <cousinmarc@gmail.com>: > > The following bug has been logged online: > >=20 > > Bug reference: 5801 > > Logged by: Marc Cousin > > Email address: cousinmarc@gmail.com > > PostgreSQL version: 9.0.2 > > Operating system: Windows XP > > Description: characters not encoded properly for column names > > Details: > >=20 > > I get a different behaviour between a Linux and a Windows server, when a > > user creates an accentuated column name. > >=20 > > All tests below were done with a linux psql client, the console being s= et > > on win1252 charset (so the input character is truly '=C3=A9' in win1252) > >=20 > > With the Linux server : > > marc=3D# SET client_encoding TO 'win1252'; > > SET > > marc=3D# CREATE TABLE test (nom varchar, pr=C3=A9nom varchar); > > CREATE TABLE > >=20 > >=20 > > marc=3D# \d test > >=20 > >=20 > > Table "public.test" > >=20 > >=20 > > Column | Type | Modifiers > >=20 > >=20 > > --------+-------------------+----------- > >=20 > >=20 > > nom | character varying | > >=20 > >=20 > > pr=C3=A9nom | character varying | > >=20 > > 'pr=C3=A9nom' is also displayed correctly if client_encoding and consol= e are > > UTF8, so the conversion is good. > >=20 > > With the Windows server : > > test=3D# SET client_encoding TO 'win1252'; > > SET > > test=3D# CREATE TABLE test (nom varchar, pr=C3=A9nom varchar); > > CREATE TABLE > > test=3D# \d test > > ERROR: invalid byte sequence for encoding "UTF8": 0xe3a96e > > test=3D# SELECT attname from pg_attribute where attrelid =3D (select oi= d from > > pg_class where relname =3D 'test'); > > ERROR: invalid byte sequence for encoding "UTF8": 0xe3a96e > > test=3D# select version(); > > version > > ------------------------------------------------------------- > > PostgreSQL 9.0.2, compiled by Visual C++ build 1500, 32-bit > > (1 row) > >=20 > >=20 > > The main reason that this is a problem is that the table cannot be > > pg_dumped anymore because of this. > >=20 > > -- > > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > > To make changes to your subscription: > > http://www.postgresql.org/mailpref/pgsql-bugs
pgsql-bugs by date: