Forum Moderators: coopster

Message Too Old, No Replies

Arabic email subject!

Look fine in yahoo & hotmail but not G-Mail!

         

smagdy

6:21 pm on Jan 20, 2007 (gmt 0)

10+ Year Member



Hello,

I am working on a form that users can write in it in English & Arabic and then they get email with the info they wrote!

So, first i used "UTF-8" encoding, so the emails worked fine in gmail(Body & subj) but not at all in hotmail or yahoo..

Then i changed the encoding to "windows-1256" so it worked fine in body and subject in hotmail, yahoo, (body of Gmail but not subj)

So, how can i fix that? i am using PHP latest version!

Thanks in advance

mcibor

9:27 pm on Jan 21, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can always combine these two methods and send Windows-1256 to hotmail and yahoo and utf-8 to other.

I think, that as utf is becoming more and more common (my server provider also changed to utf, what created drastic problems for me), you can fairly decide to use it more often.

Hope this helps you
Michal

PS. For google related problems you can contact them directly
[mail.google.com...]

however they know of this problem, so I suggest sending the messages in UTF

smagdy

10:34 pm on Jan 21, 2007 (gmt 0)

10+ Year Member



Thanks for reply,

But do u mean that i better send just to hotmail & yahoo "windows-1256"

and UTF-8 to all the rest?

mcibor

8:24 am on Jan 23, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, that's exactly what I wanted to say

I'm not sure how to accomplish that, because I don't know if there is an easy way to convert one charset to another.
If the only solution is meta, then I would suggest creating page in UTF-8 and redirecting on finding out if email is yahoo/hotmail to windows.

It will require some javascript and easy php to do, I hope you manage
If not, just write and we'll try to help.

Michal

smagdy

10:25 am on Jan 23, 2007 (gmt 0)

10+ Year Member



Thanks, but is it just hotmail and yahoo that cant display arabic using UTF-8?

I mean how will i know about the rest of email servers...?

Isnt there a solution that just works on all?

mcibor

9:09 am on Jan 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think it is related with the server, especially the database or file system where the mail is stored.

If it has utf enabled, then it will display fine, if not, then there may appear garbled text.

I have a similar problem with Polish - there are three types of coding: utf, iso and windows. I really don't know of any way to find out if one server will work fine with these characters or not.

I think for other servers you would have to try and if they won't parse utf, then send the message in windows formatting.

Maybe someone knows an answer how to find if the server will manage the utf encoding.

Regards
Michal

smagdy

10:10 am on Jan 25, 2007 (gmt 0)

10+ Year Member



Hello,

Thanks everybody, now it works on all...

The problem was: I am using PHPMailer, and its
var $CharSet was set to iso-8859-1 so i changed it to windows-1256 and it worked fine on all mails!

So last question, is it better to keep it like that since there will be some arabic involved, or better change it to UTF-8? though i dono if it will work fine with all if i change to UTF-8!

Thanks

mcibor

11:40 am on Jan 25, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If it works fine I would leave it until it stops working fine ;)

Then you can change to coding that would be best for you.

Glad you solved it!

Michal