On Jun 16, 2005, at 12:37, 時期 精霊 wrote: Never had problem with UTF-8, but just an advice to solve your problem. Try to locate it. Save the user input in a file within java and verify that. [...]
I cannot help you with mysql, but if java ouput wrong char, I can help.
I've juste tested this, and the result is puzzlling: If I save the user input to a file, forcing the file encoding to UTF-8, the accented chars appear as garbage (code below) If I save the same user user input without forcing the encoding, the content of the file is fine... Does this look normal to you?
Regards,
François
===== Sample code 1==== File outputFile = new File("/tmp/encodingTest.txt"); FileOutputStream out = new FileOutputStream(outputFile); OutputStreamWriter writer = new OutputStreamWriter(out, Charset.forName("UTF-8")); writer.write(testObject.name()); writer.close();
=========================
|