转换阿拉伯语文本到HTML code字 [英] Convert Arabic text to HTML Code characters

查看:1113
本文介绍了转换阿拉伯语文本到HTML code字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图发送一个包含阿拉伯文文本的电子邮件,我的问题是,当我添加了阿拉伯语文本的电子邮件,它它更改为随机字母(与电子邮件的字符编码​​做的事情 - 我可以' 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 codeS(ا),所以那么它会出现在我的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逃逸(例如&放大器;#1505; )中,并打开电子邮件通过设置 的ContentType 以HTML 的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

要转换UNI code到HTML逃不过您可以使用内置的功能的 HTMLEn code

To convert the unicode to HTML escapes you can use the built in function HTMLEncode.

mailer.BodyText =  Server.HTMLEncode(body)

<子>注意:您的浏览器需要有相应的一组安装字形

这篇关于转换阿拉伯语文本到HTML code字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆