Update of /cvsroot/monetdb/clients/src/java/src/nl/cwi/monetdb/mcl/io
In directory
sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv27756/src/nl/cwi/monetdb/mcl/io
Modified Files:
Tag: Clients_1-20
BufferedMCLReader.java BufferedMCLWriter.java
Log Message:
Fix an encoding bug.
We didn't encode to and decode from the server as UTF-8. As a result,
the server could receive non-UTF-8 byte sequences, resulting in the SQL
case the message !unexpected end of input.
We now properly encode whatever we have to UTF-8.
This in particularly is a problem on Windows. This check-in does NOT
fix a problem with Windows, as there is still a charset problem.
Windows users can now store and recall "weird" characters, but in the
database, these are not stored as the character the windows user sees.
This is due to Windows exporting locale = cp1252 to console
applications, whereas in reality it uses locale cp743 (DOS). This
guarantees a mismatch.
Index: BufferedMCLWriter.java
===================================================================
RCS file:
/cvsroot/monetdb/clients/src/java/src/nl/cwi/monetdb/mcl/io/Attic/BufferedMCLWriter.java,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -u -d -r1.2 -r1.2.4.1
--- BufferedMCLWriter.java 20 Apr 2007 13:41:30 -0000 1.2
+++ BufferedMCLWriter.java 4 Dec 2007 12:25:17 -0000 1.2.4.1
@@ -50,8 +50,10 @@
*
* @param in An OutputStream
*/
- public BufferedMCLWriter(OutputStream in) {
- super(new OutputStreamWriter(in));
+ public BufferedMCLWriter(OutputStream in, String enc)
+ throws UnsupportedEncodingException
+ {
+ super(new OutputStreamWriter(in, enc));
}
/**
Index: BufferedMCLReader.java
===================================================================
RCS file:
/cvsroot/monetdb/clients/src/java/src/nl/cwi/monetdb/mcl/io/Attic/BufferedMCLReader.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -d -r1.3 -r1.3.2.1
--- BufferedMCLReader.java 16 Jul 2007 15:47:49 -0000 1.3
+++ BufferedMCLReader.java 4 Dec 2007 12:25:16 -0000 1.3.2.1
@@ -76,8 +76,10 @@
*
* @param in An InputStream
*/
- public BufferedMCLReader(InputStream in) {
- super(new InputStreamReader(in));
+ public BufferedMCLReader(InputStream in, String enc)
+ throws UnsupportedEncodingException
+ {
+ super(new InputStreamReader(in, enc));
}
/**
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins