我在使用 Java 代码发送的邮件中显示土耳其语字符时遇到问题。这些字符在邮件中显示为问号 (?)。
Message msg = new MimeMessage(mailSession);
msg.setHeader("Content-Encoding","ISO-8859-9");
msg.setFrom(new InternetAddress(from));
InternetAddress[] address = {new InternetAddress(to)};
msg.setRecipients(Message.RecipientType.TO, address);
msg.setSubject(subject,"iso-8859-9");
msg.setSentDate(new Date());
msg.setContent(messageText, "text/html;ISO-8859-9");