pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Unicode problem inserting records - Invalid UNICODE character sequence found (0xfc7269)
5+ messages / 3 participants
[nested] [flat]

* Unicode problem inserting records - Invalid UNICODE character sequence found (0xfc7269)
@ 2004-11-10 17:19  David B <postgresql@thegatelys.com>
  0 siblings, 1 reply; 5+ messages in thread

From: David B @ 2004-11-10 17:19 UTC (permalink / raw)
  To: pgsql-sql

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




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Unicode problem inserting records - Invalid UNICODE character
@ 2004-11-10 18:34  Richard Huxton <dev@archonet.com>
  parent: David B <postgresql@thegatelys.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Richard Huxton @ 2004-11-10 18:34 UTC (permalink / raw)
  To: David B <postgresql@thegatelys.com>; +Cc: pgsql-sql

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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Unicode problem inserting records - Invalid UNICODE character
@ 2004-11-11 19:29  David B <postgresql@thegatelys.com>
  parent: Richard Huxton <dev@archonet.com>
  0 siblings, 2 replies; 5+ messages in thread

From: David B @ 2004-11-11 19:29 UTC (permalink / raw)
  To: pgsql-sql

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




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Unicode problem inserting records - Invalid UNICODE character
@ 2004-11-12 08:18  Richard Huxton <dev@archonet.com>
  parent: David B <postgresql@thegatelys.com>
  1 sibling, 0 replies; 5+ messages in thread

From: Richard Huxton @ 2004-11-12 08:18 UTC (permalink / raw)
  To: David B <postgresql@thegatelys.com>; +Cc: pgsql-sql

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

Attachments:

unicode_import_test.txt (text/plain, 112B) download CREATE TABLE foo (t text); -- DELETE FROM foo; COPY foo FROM STDIN; AAA À È Ð Ø ZZZ \. SELECT * FROM foo;
^ permalink raw reply [nested|flat] 5+ messages in thread

* Re: Unicode problem inserting records - Invalid UNICODE
@ 2004-11-12 09:57  Markus Schaber <schabios@logi-track.com>
  parent: David B <postgresql@thegatelys.com>
  1 sibling, 0 replies; 5+ messages in thread

From: Markus Schaber @ 2004-11-12 09:57 UTC (permalink / raw)
  To: David B <postgresql@thegatelys.com>; +Cc: pgsql-sql

Hi, David,

On Thu, 11 Nov 2004 11:29:22 -0800
"David B" <postgresql@thegatelys.com> 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


-- 
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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2004-11-12 09:57 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-11-10 17:19 Unicode problem inserting records - Invalid UNICODE character sequence found (0xfc7269) David B <postgresql@thegatelys.com>
2004-11-10 18:34 ` Re: Unicode problem inserting records - Invalid UNICODE character Richard Huxton <dev@archonet.com>
2004-11-11 19:29   ` Re: Unicode problem inserting records - Invalid UNICODE character David B <postgresql@thegatelys.com>
2004-11-12 08:18     ` Re: Unicode problem inserting records - Invalid UNICODE character Richard Huxton <dev@archonet.com>
2004-11-12 09:57     ` Re: Unicode problem inserting records - Invalid UNICODE Markus Schaber <schabios@logi-track.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox