Posted By:
rohit_devgun
Posted On:
Thursday, April 25, 2002 12:43 AM
String geekvalues = "&# 966;&# 948;&# 945;&# 963;&# 966;&# 945;&# 963;&# 948;&# 966;"; ( i have inserted space b/w &# ddd; because while framing the query they get converted to greek char) I parse the following string and insert the integer values in the following o/p stream with UTF8 ecoding. I can see proper greek char in the file, but when i read the contents of the file and try inserting these values to the DB, they appear as ¿¿¿¿¿¿¿¿¿(not what i see on my m/c) some junk char. bufferWriter = new BufferedWriter (new OutputStreamWrite
More>>
String geekvalues = "&# 966;&# 948;&# 945;&# 963;&# 966;&# 945;&# 963;&# 948;&# 966;";
( i have inserted space b/w &# ddd; because while framing the query they get converted to
greek char)
I parse the following string and insert the integer values in the following
o/p stream with UTF8 ecoding.
I can see proper greek char in the file, but when i read the contents of the file
and try inserting these values to the DB, they appear as ¿¿¿¿¿¿¿¿¿(not what i see on my m/c) some junk char.
bufferWriter = new BufferedWriter
(new OutputStreamWriter(new FileOutputStream("d:\tempAA.txt",false),"UTF8"));
bufferWriter.write(x);
bufferReader = new BufferedReader
(new InputStreamReader(new FileInputStream("d:\tempAA.txt"),"UTF8"));
retGreekValue =bufferReader.readLine();
String sqlStr = "INSERT INTO test_table VALUES('"+retGreekValue+"')";
Could anybody suggest how do i insert proper greek characters in Database from the encoded string from browser.
Thanks in advance,
.
<<Less