Re: Sure: Bug with Encoding: \x80 \x81 ...
Posted by: Bambarbia Kirkudu
Date: June 02, 2007 07:33PM

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();

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.