[MonetDB-users] Portuguese Characters

Hi, I am trying to insert data which has Portuguese Characters and I get some errors. Using the copy command: sql>copy into d_concelho from '/monetdb5/bo/dados/d_concelho.txt' delimiters '|'; !SQLException:sql:value ALTER DO CH├O|12|20071202 from line 23 not inserted !SQLException:importTable:failed to import table Using a java program with jdbc: D:\MonetDB5>java Concelho java.sql.SQLException: unexpected end of input at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.executeQuery(MonetConnection.java:2048) at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.processQuery(MonetConnection.java:1798) at nl.cwi.monetdb.jdbc.MonetStatement.internalExecute(MonetStatement.java:371) at nl.cwi.monetdb.jdbc.MonetStatement.execute(MonetStatement.java:340) at nl.cwi.monetdb.jdbc.MonetPreparedStatement.execute(MonetPreparedStatement.java:209) at Concelho.main(Concelho.java:25) Is there any way to get this running? Thanks very much, Paulo Jorge Dias -- View this message in context: http://www.nabble.com/Portuguese-Characters-tf4938671.html#a14136589 Sent from the monetdb-users mailing list archive at Nabble.com.

On 03-12-2007 11:14:55 -0800, Paulo Jorge Dias wrote:
Hi,
I am trying to insert data which has Portuguese Characters and I get some errors.
Using the copy command:
sql>copy into d_concelho from '/monetdb5/bo/dados/d_concelho.txt' delimiters '|'; !SQLException:sql:value ALTER DO CH├O|12|20071202 from line 23 not inserted !SQLException:importTable:failed to import table
Using a java program with jdbc:
D:\MonetDB5>java Concelho java.sql.SQLException: unexpected end of input
Is there any way to get this running?
Very interesting. This is an encoding problem as seen before on this list. However this time also mclient is involved. Is it possible for you to send me a snippet of the data you are loading that makes this fail? Or attach it to a bug?

On 03-12-2007 21:04:44 +0100, Fabian Groffen wrote:
On 03-12-2007 11:14:55 -0800, Paulo Jorge Dias wrote: [snip]
Using a java program with jdbc:
D:\MonetDB5>java Concelho java.sql.SQLException: unexpected end of input
Is there any way to get this running?
Very interesting. This is an encoding problem as seen before on this list. However this time also mclient is involved. Is it possible for you to send me a snippet of the data you are loading that makes this fail? Or attach it to a bug?
After several hours of "fun" with Windows XP Sjoerd and I fixed a bug present in both the Python and Java libraries as they didn't send and receive UTF-8 byte sequences to and from the server if the current locale wasn't UTF-8. We fixed this now, avoiding the "unexpected end of input" error. With the latest JDBC driver (Canephora_p2/MCL 1.2) you can now store and receive non-regular characters from Windows, however they are not stored correctly in the database. This is not a problem as long as you don't use another (non-windows) client to retrieve the data. It is hard to fix above issue, because Windows reports locale cp1252 to the application (Python, Java) whereas in the command line it really is cp743 (DOS).

On 04-12-2007 13:32:23 +0100, Fabian Groffen wrote:
With the latest JDBC driver (Canephora_p2/MCL 1.2) you can now store and receive non-regular characters from Windows, however they are not stored correctly in the database. This is not a problem as long as you don't use another (non-windows) client to retrieve the data.
To clarify the horror of this problem a bit more: If you start ADS or some other java application without the console (ie. double clicking) you DO get the right encoding, and the characters are stored correctly. Mixing that with the console results in seeing all kinds of unexpected characters.
participants (2)
-
Fabian Groffen
-
Paulo Jorge Dias