Re: UNICODE and SQL

From: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: Marco Roda <MarcoRoda(at)amdosoft(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: UNICODE and SQL
Date: 2003-05-05 19:22:12
Message-ID: Pine.LNX.4.44.0305051707100.16184-100000@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, 5 May 2003, Marco Roda wrote:

> Hallo,
>
> I need to use SQL to insert some language specific characters into tables.
> In particular I am using German and Croatian specific characters. The
> database is created with UNICODE encoding.
> For instance, when trying to run from psql:
>
> INSERT INTO test VALUES (1,'Urlaubslite fόr nδchstes Jahr');
>
> I get the following error:
>
> ERROR: Invalid UNICODE character sequence found (0xfc7220)
>
> because of 'ό' and 'δ'.
>
> How to do it?

If you want UTF-8 with psql
then you must enable UTF-8 capable keyboard in X11.

Now, normally in modern UNIX systems (with not so modern
UTF-8 support),
you often can deal with this problem by using
(or writing) an application (e.g. in Java) that
has Unicode support.

As you are, you must
know or calculate the UTF-8 representation
of each german or hrvcki ISO char, take
both bytes of the resulting UTF-8 char
and put them in the insert statement.

Not very Handy :(

Also check out for some tool like
PgPhpAdmin and then set your mozilla
page encoding to UTF-8.

P.S.
Anyone knows if pgaccess supports Unicode at all???

> Thanks,
> Marco Roda
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>

--
==================================================================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel: +30-210-8981112
fax: +30-210-8981877
email: achill(at)matrix(dot)gatewaynet(dot)com
mantzios(at)softlab(dot)ece(dot)ntua(dot)gr

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael A Nachbaur 2003-05-05 19:26:35 Re: Replication for a large database
Previous Message Michael Teter 2003-05-05 19:19:42 Re: Replication for a large database