hi,encoding String value?

hi,

[code][

PrintWriter out = new PrintWriter(new OutputStreamWriter(res.getOutputStream(), "UTF8"), true);

the above line working well, i can able to convert to UTF-8 encoding.

how to convert string values to URF-8 .

any one can convert the following lines to UTF-8

StringWriter writer = new StringWriter();

OutputStream out = response.getOutputStream();

out.write(writer.toString().getBytes());

/code]

thanks

siva

[488 byte] By [bronze-starDukes] at [2007-11-26 12:15:16]
# 1
out.write(writer.toString().getBytes("UTF-8"));
goldstar at 2007-7-7 14:18:56 > top of Java-index,Archived Forums,Socket Programming...
# 2
hi,thanks.working fine.siva
bronzestar at 2007-7-7 14:18:56 > top of Java-index,Archived Forums,Socket Programming...