views:

83

answers:

3

i have a contact form sending itself to me by email using ASP classic, CDO.message.

thing is, that it has hebrew characters and i encoded it UTF-8. but when sending to my email i get ??????? instead of hebrew.

i copied the exact files handeling this form to another FTP i have, and BOOM! it works fine..

what is the cause?

+1  A: 

Is it possible that the FTP client was running in ASCII mode and thus messing up non-ASCII characters?

Michael Borgwardt
i am using ADOBE Dreamweaver, and it uploads the file on save. u think i can choose the upload mode somehow?
Noam Smadja
I have no idea, but I'd consider it unlikely that it would switch modes on its own. Maybe the problem has another cause; there's not enough information to tell.
Michael Borgwardt
+1  A: 

Make sure that you've saved your ASP pages as UTF8 format -- it's not always enough to just have HTML and server-side ASP pointers to UTF8.

If you're working on Windows then most Windows apps seem to save in either your current locale or in Windows-1252 (ANSI) by default and not UTF8.

Try opening your files in Notepad and when you go to "Save As..." change the encoding from ANSI to UTF8 and upload again. Ignore the 3 odd metacharacters you might see at the beginning of the file (if you do), this is the Unicode BOM.

However, it's worth including every pointer you can to your page being UTF-8 ie HTML metatags, ASP locale settings, FORM tags can have an encoding specified, and if you're absolutely sure your page is XHTML compliant then an XML header.

Cirieno
thing is, i save the file and upload it to 2 different servers.one one server it works. on the other i get "geberish"
Noam Smadja
I trust that both servers are identical -- in ASP locale, at least. There are easily six or seven places in one single script where encoding and locale settings can be set or changed. Maybe I should post a list... If both scripts are identical (and are presented to the browser in an identical fashion) and are saved in UTF8 as mentioned above, then the discrepancy must be either at the global Application level or the IIS level of the machine...
Cirieno
A: 

Not sure if this applies, but are you sure both servers have the Hebrew character sets installed properly?

Had a similar issue once with Chinese simplified getting garbled on one server and working on the other. Re-installing Asian language pack fixed the problem. Not sure if you need a language pack for Hebrew, but might be worth checking.

Fortuatis