Re: Sure: Bug with Encoding: \x80 \x81 ...
Bug submitted:
http://bugs.mysql.com/bug.php?id=28853
Looks like it happens in multithreaded environment; I tried to repeat (standalone) by direct URL->ByteArray->JavaString->MySQL - it doesn't happen...
URL httpUrl = new URL("
http://www.complete-it.ca/projector/SanyoPLC-XT25.php");
InputStream is = httpUrl.openStream();
byte[] content = new byte[200000];
int nextByte;
int index = 0;
try {
while ((nextByte = is.read()) != -1) {
content[index]=(byte) nextByte;
index++;
}
} catch (Throwable e) {
e.printStackTrace();
}
test = new String (content, "windows-1252");
System.out.println("Content retrieved from Web: "+test);
ps.setString(1, test);
ps.execute();