Unix Technical Forum

Encoding Problem

This is a discussion on Encoding Problem within the pgsql Interfaces jdbc forums, part of the PostgreSQL category; --> Hello. I have a problem with JDBC and PostgreSQL. Example: Class.forName("org.postgresql.Driver"); String url = "jdbc ostgresql://localhost:5432/GE"; Connection con = ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces jdbc

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-16-2008, 12:16 AM
meil parachorras
 
Posts: n/a
Default Encoding Problem

Hello.

I have a problem with JDBC and PostgreSQL.

Example:
Class.forName("org.postgresql.Driver");
String url = "jdbcostgresql://localhost:5432/GE";
Connection con = DriverManager.getConnection(url,"user","pass");
Statement st = con.createStatement();
sql = "INSERT INTO Auffinden VALUES ('1','München');";
ResultSet res = st.executeQuery(sql);
con.close();

And I receive this error:
org.postgresql.util.PSQLException: ERROR: character 0xc383 of encoding
"UTF8" has no equivalent in "ISO_8859_5".

How can I data with encoding ISO_8859_5 with JDBC senden?

I use the drivers: postgresql-8.1-405.jdbc2.jar with postgresql 8.1 and JDK
5.0.

Best regards,
Michael.

__________________________________________________ _______________
Descarga gratis la Barra de Herramientas de MSN
http://www.msn.es/usuario/busqueda/b...NINGTEXT_MSNBH


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-16-2008, 12:16 AM
Marc Herbert
 
Posts: n/a
Default Re: Encoding Problem

"meil parachorras" <meilparachorras@hotmail.com> writes:

> Example:
> Class.forName("org.postgresql.Driver");
> String url = "jdbcostgresql://localhost:5432/GE";
> Connection con = DriverManager.getConnection(url,"user","pass");
> Statement st = con.createStatement();
> sql = "INSERT INTO Auffinden VALUES ('1','München');";
> ResultSet res = st.executeQuery(sql);
> con.close();
>
> And I receive this error:
> org.postgresql.util.PSQLException: ERROR: character 0xc383 of encoding
> "UTF8" has no equivalent in "ISO_8859_5".


You configured your database with a cyrillic alphabet. The error
message just means that ü (u umlaut) does not exist in this cyrillic
alphabet, you cannot write this character in cyrillic. This is NOT an
encoding issue, it's a charset issue: this character does not exist in
this charset, so there is no way you can insert it, whatever the
encoding(s).

<http://czyborra.com/charsets/iso8859.html#ISO-8859-5>

You'll easily find more detailed explanations if you search the web.


> How can I data with encoding ISO_8859_5 with JDBC senden?


?


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:48 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com