Close
jGuru Forums
Posted By: Prasad_Nutalapati Posted On: Wednesday, January 23, 2002 09:18 AM
I am recieving Japanese mails with charset "iso-2022-jp" . I want them to convert and store them as "ISO-8859-1". What I am doing is as following. int s; InputStreamReader isr= new InputStreamReader(is,"iso-2022-jp"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); while (isr.ready() && (s= isr.read()) != -1) { baos.write(s); } isr.close(); inmsg = new StringBuffer(baos.toString("ISO-8859-1")).append(" ").toString(); baos.close(); But I see lot of boxes and question mark symbols. What is wrong ? Thank you much for your help.
int s; InputStreamReader isr= new InputStreamReader(is,"iso-2022-jp"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); while (isr.ready() && (s= isr.read()) != -1) { baos.write(s); } isr.close(); inmsg = new StringBuffer(baos.toString("ISO-8859-1")).append(" ").toString(); baos.close();
Re: How can I translate/convert a mail with Content-Type: text/plain;charset="iso-2022-jp" to ISO-8859-1 ?
Posted By: John_Zukowski Posted On: Thursday, January 24, 2002 08:36 PM