Convert Arabic text to HTML Code characters

前端 未结 2 588
鱼传尺愫
鱼传尺愫 2021-01-20 16:08

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 en

2条回答
  •  遇见更好的自我
    2021-01-20 16:45

    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
    

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

    mailer.BodyText =  Server.HTMLEncode(body)
    

    Note: Your viewer will need to have the appropriate set of glyphs installed.

提交回复
热议问题