Re: Encoding problem - Mailing list pgsql-jdbc

From Pantelis Natsiavas
Subject Re: Encoding problem
Date
Msg-id 20060830100913.72856.qmail@web50408.mail.yahoo.com
Whole thread Raw
In response to Re: Encoding problem  ("Regász Imre" <linimi@gmail.com>)
Responses Re: Encoding problem  (Markus Schaber <schabi@logix-tt.com>)
List pgsql-jdbc
The whole database is created using the pgadmin tool, and I write greek characters simply through this. I do not know if that's the proper way to do it. Do youu think, that perhaps the default Windows charset is somehow involved in this process? How could this be possible when my database has a UTF8 encoding?
The problem is, that I cannot make a SELECT query through the pgadmin tool or the JDBC, using the same greek characters! That's why I think, this may not be a JDBC problem, after all. My application does not involve creating a table or a database, just querying it. I will try to create a table through JDBC, using greek characters for naming it and post an email, just to be in the archives of the list.

I am gratefull for your time. I really appreciate it.
Pantelis



Regász Imre <linimi@gmail.com> wrote:
How do you create the table? Which tool?
Can you create the table with java code over jdbc?

I think if you create table with java code and run query with java
code then everithing will ok I think.

(Sorry, my english is not too good.)

Imi

On 8/30/06, Pantelis Natsiavas wrote:
> I am not really sure, about what you are asking. I am writing in
> JBuilder. I tried to use the default encoding in JBuilder project and I got
> the same error. Then tried to change it to UTF-8 but still nothing. I think
> that this should be the encoding of the source file. I don't understand why
> I should have the table name in the java source file.
> I create only a String object which contains the SQL query and works
> fine with english-named tables. The String containing the SQL query is
> encoded in UTF-8 but it doesn't work when I use greek characters. I ensist
> that the problem should be in PostgreSQL settings and not in my code,
> because I tried to make the same query through the query tool in pgadmin and
> I got the same error. I even tried, to save the query in Windows Notepad
> using UTF-8 and then load it through the proper option in the query tool of
> pgadmin and still the same error occurs.
>
> Always thankful,
> Pantelis
>
>
> Regász Imre wrote:
>
> Hi,
>
> Is there table name in java source file? What is the encoding of java
> source file?
>
> Imi
>
> On 8/30/06, Pantelis Natsiavas wrote:
> > Hello,
> > I am really new to PostgreSQL and I seem to have an encoding problem. I
> > come from Greece and I would like to make queries using greek characters
> > too. I chose to write my database using encoding UTF8 and everything
> worked
> > just fine creating it, until I tried to make a query using greek
> characters.
> > I tried to make the query through JDBC but this was impossible,
> > receiving a message saying :
> > relation "??????????" does not exist
> > where the relation's name is in greek characters. Despite fact that the
> > relation is normally created, named and filled using greek characters, I
> > could not make the query. In addition trying to make the same query
> through
> > the query tool of pgadmin, I receive the same answer and of course null
> > results.
> > I don't know if it matters, but I am using Windows XP and PostgreSQL
> > 8.1 with JDBC 3. I have checked everything that has to do with the java
> part
> > of encoding and I cannot find anything wrong. The fact that I could not
> make
> > the query through the pgadmin query tool, shows that the problem lays at
> the
> > PostgreSQL part.
> > What could I do? Can anyone help me?
> >
> > Thank you in advance,
> > Natsiavas Pantelis
> >
> >
> > ________________________________
> > Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
> > countries) for 2¢/min or less.
> >
> >
>
>
>
>
> ________________________________
> Do you Yahoo!?
> Next-gen email? Have it all with the all-new Yahoo! Mail.
>
>

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.

pgsql-jdbc by date:

Previous
From: "Regász Imre"
Date:
Subject: Re: Encoding problem
Next
From: Markus Schaber
Date:
Subject: Re: Encoding problem