Escape sequences for unicode letters

From: "Tomisaw Kityski" <cromax(at)id(dot)pl>
To: pgsql-general(at)postgresql(dot)org
Subject: Escape sequences for unicode letters
Date: 2002-07-24 07:07:12
Message-ID: 3d3e527b$1_1@news.vogel.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I tried to find solution for my problem, but I wasn't able to find anything
useful in admin, user, tutorial, reference, programmer nor developer pdfs.

I have database declared with encoding set to 'unicode' (i.e. UTF-8,
according to docs). In initial script I would like to insert some strings
that contains UC characters into DB, but I am unable to escape them.

When I had DB with encoding 'LATIN2', then I was able to escape Latin2
specific characters with use of backslash and octet values. Unfortunatley
this \777 is not sufficient to express all characters. I tried to use
uc sequences from java (i.e. \uXXXX), but according to docs, it wouldn't
work as I expected, and well --- it didn't 8). I also tried \0xXXXX
combination,
but it didn't work either.

I tried also to set client_encoding in initial script to 'WIN1250' (as
stated in docs; I am using PSQL under Windows), but I get message, that
translation between win1250 and unicode is not supported.

Well, my question is --- how to escape certain character (let's say 0x0126
--- I mean by that, that it's greater than 0x00FF) in inserted strings?
(When I use java for that, it works okay with real unicode letters, but
I would like to have the possibility to define some characters in ISO-8859-1
encoding).

Thanks in advance,
cheers.

Browse pgsql-general by date

  From Date Subject
Next Message Pierre-Yves LANDURE 2002-07-24 07:11:41 need help : how to replace / extend existing SQL operators ?
Previous Message Tom Lane 2002-07-24 06:59:13 Re: Linux max on shared buffers?