Encoding Problem
Encoding Problem
От:
"meil parachorras" <meilparachorras@hotmail.com>
Дата:
Hello.
I have a problem with JDBC and PostgreSQL.
Example:
Class.forName("org.postgresql.Driver");
String url = "jdbc:postgresql://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/barra?XAPID=2031&DI=1055&SU=http%3A//www.hotmail.com&HL=LINKTAG1OPENINGTEXT_MSNBH
Re: Encoding Problem
От:
Marc Herbert <Marc.Herbert@continuent.com>
Дата:
"meil parachorras" writes:
> Example:
> Class.forName("org.postgresql.Driver");
> String url = "jdbc:postgresql://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).
You'll easily find more detailed explanations if you search the web.
> How can I data with encoding ISO_8859_5 with JDBC senden?
?