From: | Pedro Salazar <pedro-b-salazar(at)ptinovacao(dot)pt> |
---|---|
To: | postgres <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | error getString() --> decodeUTF8 / java.lang.ArrayIndexOutOfBoundsException: 5 |
Date: | 2003-04-11 10:19:10 |
Message-ID: | 1050056350.9815.11.camel@vitoria.intra.cet.pt |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Greetings,
I have function that returns a refcursor. When I call it in plpgsql
shell, it returns all the rows correctly. But, When I call it in JDBC,
when it tries to decode a string in specific row (7) it throws the
following exception:
java.lang.ArrayIndexOutOfBoundsException: 5
at org.postgresql.core.Encoding.decodeUTF8(Encoding.java:254)
at org.postgresql.core.Encoding.decode(Encoding.java:165)
at org.postgresql.core.Encoding.decode(Encoding.java:181)
at
org.postgresql.jdbc1.AbstractJdbc1ResultSet.getString(AbstractJdbc1ResultSet.java:97)
My refcursor returns the following list (the characters are in
portuguese language):
id | class
----+-------------
1 | Avenida
2 | Bairro
3 | Cais
4 | Estrada
5 | Largo
6 | Lugar
7 | Praça
8 | Rotunda
9 | Rua
10 | Sítio
11 | Travessa
12 | Urbanização
The row number 7 (Praça) [character 'C' with cedilla] is throwing the
above exception. How should I retrieve my string which has portuguese
characters, in JDBC?
thanks,
Pedro Salazar.
--
PS
pedro-b-salazar(at)ptinovacao(dot)pt
PGP:0E129E31D803BC61
From | Date | Subject | |
---|---|---|---|
Next Message | Pedro Salazar | 2003-04-11 10:40:15 | Re: error getString() --> decodeUTF8 / |
Previous Message | Barry Lind | 2003-04-11 01:01:39 | Re: Performance of batches with Statements and PreparedStatements |