Unicode problem inserting records - Invalid UNICODE character sequence found (0xfc7269)
Unicode problem inserting records - Invalid UNICODE character sequence found (0xfc7269)
am 10.11.2004 18:19:42 von postgreSQL
My first time using unicode. Based on reading other messages I think I've
got it all setup correctly but still have prob.
Running: psql 7.3.6-RH
$ psql -l
List of databases
Name | Owner | Encoding
-----------+----------+-----------
devdb | devuser | UNICODE
template0 | postgres | SQL_ASCII
template1 | postgres | SQL_ASCII
I've tried two different table structures:
CREATE TABLE airport_code (
airport_name character varying(70),
airport_code character varying(10),
) ;
and the same but with "text" instead of character varying.
For both I get the same results when I try to:
INSERT INTO airport_code ( airport_name, airport_code ) values ( 'Zurich
(Zürich) - Kloten', 'ZRH' ) ;
I get:
psql:airport_codes.sql:1728: ERROR: Invalid UNICODE character sequence
found (0xfc7269)
Obviously I'd like to keep the proper German spelling.
What am I missing?
Gotta figure its me...cause PG is so damm good otherwise.
Tx,
D
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 9/28/2004
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
Re: Unicode problem inserting records - Invalid UNICODE character
am 10.11.2004 19:34:17 von dev
David B wrote:
> My first time using unicode. Based on reading other messages I think I've
> got it all setup correctly but still have prob.
> Running: psql 7.3.6-RH
[snip]
> For both I get the same results when I try to:
>
> INSERT INTO airport_code ( airport_name, airport_code ) values ( 'Zurich
> (Zürich) - Kloten', 'ZRH' ) ;
>
>
> I get:
>
> psql:airport_codes.sql:1728: ERROR: Invalid UNICODE character sequence
> found (0xfc7269)
>
> Obviously I'd like to keep the proper German spelling.
What is your client encoding? (look into "show client_encoding",
"\encoding" in the "Localization" chapter of the manuals)
--
Richard Huxton
Archonet Ltd
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
Re: Unicode problem inserting records - Invalid UNICODE character
am 11.11.2004 20:29:22 von postgreSQL
show client_encoding gives:
UNICODE
databases reads:
DATABASE OWNER ENCODING
mydb david UNICODE
testdb david SQL_ASCII
table columns are character varying(255)
Tx,
David
-----Original Message-----
From: pgsql-sql-owner@postgresql.org
[mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Richard Huxton
Sent: Wednesday, November 10, 2004 10:34 AM
To: David B
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Unicode problem inserting records - Invalid UNICODE
character
David B wrote:
> My first time using unicode. Based on reading other messages I think I've
> got it all setup correctly but still have prob.
> Running: psql 7.3.6-RH
[snip]
> For both I get the same results when I try to:
>
> INSERT INTO airport_code ( airport_name, airport_code ) values ( 'Zurich
> (Zürich) - Kloten', 'ZRH' ) ;
>
>
> I get:
>
> psql:airport_codes.sql:1728: ERROR: Invalid UNICODE character sequence
> found (0xfc7269)
>
> Obviously I'd like to keep the proper German spelling.
What is your client encoding? (look into "show client_encoding",
"\encoding" in the "Localization" chapter of the manuals)
--
Richard Huxton
Archonet Ltd
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
---
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 9/28/2004
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
Re: Unicode problem inserting records - Invalid UNICODE character
am 12.11.2004 09:18:38 von dev
This is a multi-part message in MIME format.
--------------070807090602000003010105
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
David B wrote:
> show client_encoding gives:
> UNICODE
>
> databases reads:
> DATABASE OWNER ENCODING
OK - with the same settings here, I start psql and do:
\i unicode_import_test.txt
I get:
CREATE TABLE
t
---------
AAA
À È Ð Ø
ZZZ
(3 rows)
In case this gets garbled by my email, the middle line contains four
accented characters, with accents as follows: A` E` D- O/
Actually, this doesn't display properly in my usual terminal (konsole
under KDE) but does under xterm.
--
Richard Huxton
Archonet Ltd
--------------070807090602000003010105
Content-Type: text/plain;
name="unicode_import_test.txt"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline;
filename="unicode_import_test.txt"
CREATE TABLE foo (t text);
-- DELETE FROM foo;
COPY foo FROM STDIN;
AAA
à à à Ã
ZZZ
\.
SELECT * FROM foo;
--------------070807090602000003010105
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
--------------070807090602000003010105--
Re: Unicode problem inserting records - Invalid UNICODE
am 12.11.2004 10:57:19 von schabios
Hi, David,
On Thu, 11 Nov 2004 11:29:22 -0800
"David B" wrote:
> show client_encoding gives:
> UNICODE
So is the data you send also encoded in unicode?
Maybe "set client_encoding latin1" or "\encoding latin1" helps.
HTH,
markus
--=20
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios@logi-track.com | www.logi-track.com
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly