我正在尝试发送一封包含阿拉伯文本的电子邮件,我的问题是当我将阿拉伯文本添加到电子邮件中时,它会将其更改为随机字母(与电子邮件的字符编码有关 - 我可以't改变).
I'm trying to send an email containing Arabic text, my problem is that when I add the Arabic text to the email, it changes it to random letters (to do with the character encoding of the email - which I can't change).
是否有内置函数或自定义函数可用于将阿拉伯语转换为 HTML 代码 (ا),以便随后出现在我的 HTML 电子邮件中?
Is there a built in function or a custom function I can use to convert the Arabic to HTML Codes (ا) so it will then appear in my HTML email?
保留 HTML 转义符(例如 ס
),并通过设置 ContentType
到 text/html
Leave the HTML escapes (ex ס
) in, and turn the e-mail to HTML by setting ContentType
to text/html
'Create mailer
mailer.ContentType = "text/html"
'User mailer
要将 unicode 转换为 HTML 转义,您可以使用内置函数 HTMLEncode.
To convert the unicode to HTML escapes you can use the built in function HTMLEncode.
mailer.BodyText = Server.HTMLEncode(body)
注意:您的查看器需要安装适当的字形集.
这篇关于将阿拉伯文本转换为 HTML 代码字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!