我有一个拥有以下字符集信息的eml。
Content-Type: text/plain; charset="iso-2022-cn"
虽然没有问题,但是当我将相同的eml写回磁盘时,我得到以下错误,有什么想法吗?
java.lang.UnsupportedOperationException
at sun.nio.cs.ext.ISO2022_CN.newEncoder(ISO2022_CN.java:76) ~[?:?]
at sun.nio.cs.StreamEncoder.<init>(StreamEncoder.java:176) ~[?:1.8.0_161]
at sun.nio.cs.StreamEncoder.forOutputStreamWriter(StreamEncoder.java:59) ~[?:1.8.0_161]
at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:100) ~[?:1.8.0_161]
at com.sun.mail.handlers.text_plain.writeTo(text_plain.java:161) ~[bin/:?]
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:889) ~[?:1.8.0_161]
at javax.activation.DataHandler.writeTo(DataHandler.java:317) ~[?:1.8.0_161]
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1486) ~[bin/:?]
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:865) ~[bin/:?]
at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:462) ~[bin/:?]
at com.sun.mail.handlers.multipart_mixed.writeTo(multipart_mixed.java:103) ~[bin/:?]
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:889) ~[?:1.8.0_161]
at javax.activation.DataHandler.writeTo(DataHandler.java:317) ~[?:1.8.0_161]
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1486) ~[bin/:?]
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:865) ~[bin/:?]
at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:462) ~[bin/:?]
at com.sun.mail.handlers.multipart_mixed.writeTo(multipart_mixed.java:103) ~[bin/:?]
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:889) ~[?:1.8.0_161]
at javax.activation.DataHandler.writeTo(DataHandler.java:317) ~[?:1.8.0_161]
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1486) ~[bin/:?]
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1773) ~[bin/:?]
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1749) ~[bin/:?]