Link to home
Start Free TrialLog in
Avatar of dog_star
dog_star

asked on

Non-English encoding in Jmail

hi,

i'm sending a hebrew ASP page as a newsletter using Jmail.... i had a problem that all the text was showing garbled when the mail arrived.

kelvinwkw showed me that using server.htmlencode on the dynamic parts of the page displayed it correctly.

my problem now is that are a few lines of text on this asp page which are not taken from a database and these are still showing garbled when the mail is received....

i tried <%=Server.HTMLEncode(Response.Write("hebrew text here"))%> but the text still does not display.

any suggestions?

thanks

dog
ASKER CERTIFIED SOLUTION
Avatar of kelvinwkw
kelvinwkw
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dog_star
dog_star

ASKER

hi,

thanks for your reply...

i should have given a little more info in my original post....

i am using utf-8 as the encoding and the page displays correctly in the browser... in Jmail i have defined the encoding with this :

msgTemplate.ContentType = "text/html; charset=UTF-8"
'msgTemplate.ContentTransferEncoding = "65001"
msgTemplate.Charset = "utf-8"

as you can see i commented out the middle line as i found it made no difference.

cheers

dog
Hi,

to ensure the hebrew text to display correctly in a file, you have to saved the file format as utf-8, but not as ANSI format.

Best Regards
Kelvin
hi kelvin,
yes, the page was saved as utf-8...
i've found why the example i gave in the OP didn't work... i used

<%=Server.HTMLEncode(Response.Write("hebrew text here"))%>

where all i needed to use was

<%=Server.HTMLEncode("hebrew text here")%>

pretty silly really....
so thanks for your help kelvin... i've given you the points for your trouble as it was your solution just i'd implemented it incorrectly :)

cheers

dog