Skip site navigation (1) Skip section navigation (2)

Re: Problem with accessing Russian UTF database

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Ronald Vyhmeister <rvyhmeister(at)aiias(dot)edu>
Cc: 'Ronald Vyhmeister' <rvyhmeister(at)gmail(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Problem with accessing Russian UTF database
Date: 2008-11-25 23:37:37
Message-ID: 492C8C41.6010408@opencloud.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Ronald Vyhmeister wrote:

> 		Locale locale = Locale.getDefault();
> 		locale = new Locale("ru", "RU");

The driver ignores locale so this won't actually be doing anything.

> 	SQL = "update sys_people set middle_name='фывфывафыва' where
> family_name='Pratt';";

I wouldn't rely on your JSP implementation / java compiler interpreting 
that string literal in the way that you assume. I suggest you construct 
your string with \uNNNN unicode escapes to be sure you're really 
compiling what you think you're compiling. Your mail headers claims a 
charset of "koi8-r" but I don't know what the default file encoding for 
your target system is; perhaps it is using ISO-8859-1 or similar, which 
might result in the above being interpreted as the accented characters 
you see in PgAdmin?

Also, as I suggested earlier, try examining your strings 
character-by-character to check that they really contain the codepoints 
you think they contain.

-O

In response to

Responses

pgsql-jdbc by date

Next:From: Ronald VyhmeisterDate: 2008-11-26 00:04:38
Subject: Re: Problem with accessing Russian UTF database
Previous:From: Oliver JowettDate: 2008-11-25 23:09:54
Subject: Re: Problem with accessing Russian UTF database

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group