On Nov 22, 2007 11:07 PM, Fabian Groffen
Ok, so that means the ? is actually the char that you try to insert, and there is a problem somewhere early in the stack to map this char into something useful, whereas it appears to be sent to the server, which just thinks it sees an EOF/invalid escape sequence.
The fact that you have a ? on your disk (are you sure about that? How do you open up the file?) means that Java already couldn't map the character to something correct.
Because xxd says it: 0000d90: 3035 3130 3635 3331 3a20 7350 5245 5041 05106531: sPREPA 0000da0: 5245 2049 4e53 4552 5420 494e 544f 2074 RE INSERT INTO t 0000db0: 6573 7420 5641 4c55 4553 2028 302c 2027 est VALUES (0, ' 0000dc0: 3f27 293b 0a52 4420 3131 3935 3830 3531 ?');.RD 11958051
It is a bug for us to make sure the server responds correctly.
It is a bug for an yet to determine party why the LATIN-1 char you insert (most probably, as you're in the windows world) isn't mapped
Windows does not exactly use latin-1, but windows-1252. However, I don't think the text I like to insert is using this encoding, since I use DbVisualizer, which has no problem inserting the Umlaut characters or an Euro sign into a MySQL database, which is configured to use UTF-8 as default encoding and into an SQLite database (using http://www.zentus.com/sqlitejdbc/). So to me it seems to be an issue of the MonetDB JDBC driver. The attached Emacs_MonetDB.png screenshot shows a correct behavior: A UTF-8 encoded sting is INSERTed, because the Python file is in UTF-8 encoding. The SELECT yields a string which is also encoded using UTF-8. This string is then decoded to a Unicode type by specifying, that the string is in 'utf-8' and the resulting Unicode type is encoded to 'windows-1252' so that is can easily be displayed in the Emacs *compilation* buffer. The attached DbVisualizer_MonetDB.png screenshot indicates, that something is not right with the MonetDB JDBC driver. For comparison the attachments Emacs_MySQL.png and DbVisualizer_MySQL.png show the same example using MySQL, and the attachments Emacs_SQLite.png and DbVisualizer_SQLite.png show the example using SQLite. No problem there. Markus