Hi All,
I am writting an Mail
Servlet Application using
Java Mail API.
In in the application, i am sending an html/.htm file as an attachment. When i open the attachment from the mail, characters like ' and " appears as question mark(?). My question is, how to read the single quotes and double quotes?
Here is the code snippet:
BufferedReader din;
String s;
din = new BufferedReader(new InputStreamReader(new BufferedInputStream(new FileInputStream(file))));
//while((s = din.readLine())!= null)
StringBuffer sBuff=new StringBuffer();
while ((s = din.readLine()) != null) {
sBuff.append(s + "\n");
}