Re: Sequence of characters not supported by psql/pg_dump

From: Samuel Minne <sminne(at)allis(dot)fr>
To: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Cc: pgsql-bugs(at)postgresql(dot)org, pbittner(at)allis(dot)fr
Subject: Re: Sequence of characters not supported by psql/pg_dump
Date: 2001-02-23 13:40:38
Message-ID: 01022315273402.21363@srvlinux01.domallis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Le jeu, 11 jan 2001, Tatsuo Ishii a crit :
> > I use PostgreSQL 7.0.2 on linux.
> > The base was set with initdb -E UNICODE.
> >
> > I have many Strings with accents (french language).
> > Some of them aren't supported by queries or pg_dump:
> >
> > WORKING EXAMPLE:
> > DB=# select * from element_attribute where java_lang_string like 'Scholt_s';
>
> Are you sure that the letter (LATIN SMALL LETTER E WITH GRAVE) is
> encoded in UTF-8? It's 2 bytes long and starting with 0xc...
> --
> Tatsuo Ishii

Sorry for the delay. We had very strong production constraint, and I had to let it go for a while.
Well, How can i know about the internal coding of this letter in the database ?
The texts where inserted from command line inserts. When inserted from JDBC (so it's supposed to be unicode),
I can't see any difference, even in the generated dump file.

Today I've seen a post about the same problem, that gives a solution to produce a working dump: pg_dump -d $dumpfile.

This command produce this kind of lines (you :
INSERT INTO "element_texte" VALUES (634,'','Filtration du Plasma','\350');

I noticed that using \xxx notation i can handle special characters in queries from psql command line, too.
But it doesn't look like unicode coding (cf www.unicode.org/charts and LATIN1-Supplement), as I was expecting.

So, I have the following questions:
- What kind of code is this ?
- can I get the translation chart somewhere ?
- why isn't it UNICODE ?
- why do I have to use \xxx code (and not 0x..., or directly the special character like "") from the psql command line,
although it is supposed to support UNICODE ?
- why don't we find this kind of characters in the dump file when the -d option is not set ?
(I assume this cause the restore to fail, and I think it could be considered as a bug).

Thank you for your help

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Erik Hofman 2001-02-23 13:56:45 non blcoking behaviour
Previous Message Rainer Mager 2001-02-23 08:42:27 RE: Problem with 7.0.3 dump -> 7.1b4 restore