Zen Cart Logo
Forums / General Questions / php email not sending out with correct character set

php email not sending out with correct character set

Locked

Views: 5,318

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
16 May 2007, 4:04 AM
#1
mahalo avatar

mahalo

New Zenner

Join Date:
May 2007
Posts:
6
Plugin Contributions:
0

php email not sending out with correct character set

Hello, supportive fellow members,
I have a serious encoding problem since my server host upgraded the PHP version from 4.4.4 to 4.4.6.
I use both English and Japanese and had no problem until this upgrade happened.
Now all the notification emails sent to customers/admin in Japanese are garbled.

The hosting company (Bluehost) said;

"This is a known issue with our servers. We are working to resolve this. Below is a temporary fix. In the meantime, you can fix your immediate concerns by overriding php's mail() function, to encode the emails to a given character set. You can add the following to your php.ini, to do this:

mbstring.language = Neutral
mbstring.internal_encoding = UTF-8
mbstring.http_input = UTF-8
mbstring.http_output = UTF-8
mbstring.encoding_translation = On
mbstring.detect_order = auto
mbstring.substitute_character = long;
mbstring.func_overload = 1

If this does not resolve the issue, contact the maker of your script, and confirm what settings you may need to add as the subject and body may be encoded differently."
Our default charset is "EUC-JP". So I edited php.ini as follows;

output_buffering = Off
default_charset = EUC-JP
mbstring.language = Japanese
mbstring.encoding_translation = On
mbstring.http_input = auto
mbstring.http_output = EUC-JP
mbstring.internal_encoding = EUC-JP
mbstring.substitute_character = none
mbstring.func_overload = 1

But it didn't solve the problem. :no:
It's been more than 6 weeks and hosting company provide us no other solution. We are losing customers.... Will anyone please help me....?? Is there anything else I can do by editing the script?

I'm not a PHP expert and not a native English speaker, but I can follow the instructions and willing to do anything I can do to solve this. Thanks,

ZenCart ver 1.3.6

16 May 2007, 10:47 AM
#2
chuckl avatar

chuckl

Totally Zenned

Join Date:
Nov 2006
Location:
Papworth, Cambridgeshire, UK
Posts:
717
Plugin Contributions:
0

Re: php email not sending out with correct character set

What happens if you modify your php.ini exactly as your hosting company suggested -

mbstring.language = Neutral
mbstring.internal_encoding = UTF-8
mbstring.http_input = UTF-8
mbstring.http_output = UTF-8
mbstring.encoding_translation = On
mbstring.detect_order = auto
mbstring.substitute_character = long;
mbstring.func_overload = 1

Otherwise you are perfectly entitled to say to them 'You have had six weeks, where is the permanent fix? If you don't have one, give me my money back'

16 May 2007, 11:08 AM
#3
mahalo avatar

mahalo

New Zenner

Join Date:
May 2007
Posts:
6
Plugin Contributions:
0

Re: php email not sending out with correct character set

Hi Chuckl, Thanks for your reply!

Chuckl:

What happens if you modify your php.ini exactly as your hosting company suggested -

mbstring.language = Neutral
mbstring.internal_encoding = UTF-8
mbstring.http_input = UTF-8
mbstring.http_output = UTF-8
mbstring.encoding_translation = On
mbstring.detect_order = auto
mbstring.substitute_character = long;
mbstring.func_overload = 1
It doesn't work neither...
They mentioned to look up
http://www.php.net/manual/en/ref.mbstring.php
for other language options. So I copied and pasted the EUC-JP version. But didn't work.

Otherwise you are perfectly entitled to say to them 'You have had six weeks, where is the permanent fix? If you don't have one, give me my money back'
Yes, that's exactly what I want to tell them. I asked them to get the PHP version back to the previous one, but got no reaction...

So wondering if there is any script modification needed to make this "mbstring things" work.

Thanks anyway.

16 May 2007, 11:28 AM
#4
chuckl avatar

chuckl

Totally Zenned

Join Date:
Nov 2006
Location:
Papworth, Cambridgeshire, UK
Posts:
717
Plugin Contributions:
0

Re: php email not sending out with correct character set

I'd have to say I haven't a clue, never do anything but english sites. I presume you are using a Japanese Zen Cart, which may well use mbstring, the only place I've seen it is in SEO modules. You could try setting the .language to Auto?
I still think that you have a case if you say to them that you are not changing anything in any ini files. They can make the ini file changes in their master ini files to return your site to its' working configuration, or at the least, give you the EXACT text to enter into the site ini file to make your site work.
Perhaps some of the Zen Cart users in Europe might have a better idea?

17 May 2007, 1:15 AM
#5
mahalo avatar

mahalo

New Zenner

Join Date:
May 2007
Posts:
6
Plugin Contributions:
0

Re: php email not sending out with correct character set

Thanks again Chuckle,

It seems that "mbstring things" certainly worked for some people (some other charset or other type of script). Actually I've already told the people in hosting company about what I exactly wrote in php.ini and asked for advise, but they don't have any other solution saying that it depends on the script... I guess they are not expert on non-English characters.

Hope there is somebody who went through the same kind of experience...
Is anybody dealing with non-English characters on php4.4.6?

10 Jun 2007, 2:47 PM
#6
mahalo avatar

mahalo

New Zenner

Join Date:
May 2007
Posts:
6
Plugin Contributions:
0

Re: php email not sending out with correct character set

Suddenly the problem is solved. I contacted server hosting company and found out that they had made some changes with the server settings.

So the thing is program works just fine on php4.4.6.
Now I can receive Japanese emails with no problem.

Thank you for your great help, Chuckl!

Mahalo