Using java mail to send email with subject in chinese (from Unicode)

From: Brian Gould (bgould@viapeople.com)
Date: Mon Feb 28 2005 - 14:14:13 CST

  • Next message: Dean Harding: "RE: Using java mail to send email with subject in chinese (from Unicode)"

    My system currently uses html escapes to send email text in any language -
    most recently Chinese. But this approach doesn't work for email subjects.
    When I attempt to simply send the subject using:

     

    msg.setSubject(subjectStringInUnicode, "ISO-8859-1");

     

    This should work, but I've also tried "big5".

     

    Sometimes I get an exception that the data cannot be encoded, and other
    times it just seems corrupt. Is there some kind of trick to this that
    someone can share?



    This archive was generated by hypermail 2.1.5 : Mon Feb 28 2005 - 14:15:27 CST