通过邮件发送非英文文本的问题
我正在尝试通过邮件发送非英文文本。非英文文本位于邮件的“发件人”字段(显示在电子邮件地址旁边的文本)。在收件人的邮箱中,非英文文本被视为一系列问号。可能出什么问题了?
以前,我在从简单的 java 程序打印非英语文本时遇到了问题。问题在于源文件使用的编码。我将其更改为 UTF-8,然后可以通过将它们嵌入到程序中来打印 unicode 文本。现在我的所有源文件都使用 UTF-8 进行编码。这是否与上述问题有任何关系? 无论如何,我是否必须提及要发送的消息所使用的编码?如果是这样,我该怎么做?
为了更详细地说明这一点,这是在通过 google 应用引擎托管的 Web 应用程序中观察到的,并且该程序是用 java 编写的。
I am trying to send non-english text over mail. The non-english text is on the "from" field of the mail (the text that appears beside the email address). In the recipient's mailbox, the non-english text is seen as a series of question marks. What could be wrong?
Previously, I was having problems with printing non-english text from a simple java program. The problem was with encoding used for the source file. I changed it to UTF-8 and could then print unicode text by embedding them into the program. Now all my source files are encoded using UTF-8. Could this be related to the above mentioned problem in any way?
By any chance, do I have to mention the encoding to be used for the message to be sent? If so, how do I do this?
Just to put in more context, this is observed in a web application that is hosted over google app engine and the program is written in java.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只能在标头中发送 ASCII 文本。非 ASCII 标头必须特殊编码。
You can only send ASCII text in headers. Non-ASCII headers must be specially encoded.