Page 1 of 1

Strange symbols

PostPosted: September 26th, 2011, 10:10 am
by le formateur
Hello,

I have strange symbols into the Signup Confirmation Email :

Image

I would like to see : Bonjour Hervé


Thank you for your help.

Re: Strange symbols

PostPosted: September 26th, 2011, 10:41 am
by Eduan
That's because the computer you're using doesn't really know that symbol ("é") so it replaces it with that symbol.

To resolve this issue you have to install a language symbol into your computer that has that symbol.
Hope this helps ;) .

P.D. Spanish has that symbol.

Re: Strange symbols

PostPosted: September 26th, 2011, 10:56 am
by le formateur
Hello Eduan,

Thank you for your help but I don't think you right because I have not this issue with the "New User Email Message". Perhaps is it a problem of character encoding in the source file or a problem of type text (plain text or html)...I don't know ?

Thank you for your help.

Re: Strange symbols

PostPosted: September 28th, 2011, 3:39 am
by Cristián Lávaque
Thanks for the feedback on this. I'll forward it to Jason.

Re: Strange symbols

PostPosted: September 28th, 2011, 3:46 am
by le formateur
Ok I'm waiting for your answer.

Thank you for your help.

Re: Strange symbols

PostPosted: September 30th, 2011, 2:47 am
by le formateur
very strange : There is no consistency

Image

Re: Strange symbols

PostPosted: October 1st, 2011, 9:13 pm
by Jason Caldwell
What is the CHARSET of your WordPress installation set to please?
SNAG-0013.png

Re: Strange symbols

PostPosted: October 2nd, 2011, 1:49 am
by le formateur
Image

Re: Strange symbols

PostPosted: October 7th, 2011, 11:43 am
by Jason Caldwell
Thanks for the follow-up.
Hmm, I'm a little stumped on this one. The only thing I can think of right now, is that it seems the strange character is appearing correctly in your email body, but not in the subject and recipient names/emails. The WordPress function wp_mail() is what s2Member uses, and this function relies upon the PHPMailer class. The PHPMailer class will encode headers ( i.e. recipients and subject line ) using the charset of your Blog ( UTF-8 ) like this: Subject: =?utf-8?B?zrXOu867zrfOvc65zrrOrA==?. If you look in the raw email that was sent, take a look for a line like this and post a sample for us please.

Re: Strange symbols

PostPosted: October 8th, 2011, 5:22 am
by le formateur
Hello,

I think I understood what you explain but I don't know where excatly I can find this file/raw.

Thank you for your help.

Re: Strange symbols

PostPosted: October 8th, 2011, 2:00 pm
by Jason Caldwell
You'll need the RAW email. For instance, in GMail you can use "Show Original".
SNAG-0021.png
SNAG-0021.png (15.92 KiB) Viewed 170 times

Re: Strange symbols

PostPosted: October 9th, 2011, 3:32 am
by le formateur
Hello,

ok here is the extract file :

Image


Thank you for your help.

Re: Strange symbols

PostPosted: October 9th, 2011, 1:14 pm
by Jason Caldwell
Thanks for the follow-up.

Hmm. Well, I think you should have Herv=C3=A9, that is the correct method of encoding the E9 character é. However, in your screenshot I see a mixture of =C3=A9 and =E9, which leads me to think that your original string is a mixture of character encodings ( i.e. not a valid UTF-8 string in its entirety ), and thus, PHP is choking on some of your é characters. Short of that, I suppose it could be a bug in PHP, what version of PHP are you running, and was it compiled with mbstring support?

To test this, create this file and open it in a browser please.
<?php phpinfo(); ?>

Also, what browser was used to enter the email body that you configured?
See: http://tyenki.com/thoughts/tag/character-encoding/

Re: Strange symbols

PostPosted: October 10th, 2011, 1:07 am
by le formateur
Hello,

my version of php : 5.2.17

more details here

thank you for your help.

Re: Strange symbols

PostPosted: October 12th, 2011, 3:35 pm
by Jason Caldwell
Thank you. Can you please create a test.php file with this in it for me?
Code: Select all
<?php
error_reporting 
(-1);
ini_set ("display_errors", true);

mb_internal_encoding ("UTF-8");
echo mb_encode_mimeheader ("Hervé", "UTF-8", "Q");
?>

Re: Strange symbols

PostPosted: October 12th, 2011, 3:59 pm
by le formateur
Hello,

the test.php file : http://www.exo-video.com/test.php

Thank you for your help.

Re: Strange symbols

PostPosted: October 12th, 2011, 4:18 pm
by Jason Caldwell
OK, you should get this:
=?UTF-8?Q?Herv=C3=A9?=
Why you are NOT? I'm not sure. You might check your text/code editor, be sure the file was created by an editor that supports UTF-8. Other than that, I'm a bit stumped right now, so sorry.

You might check your php.ini file and make sure you have default_charset = utf-8

Also, be sure that you don't have any plugins installed, which might be attempting to filter your blog_charset option in WordPress, which you've told me is set correctly to UTF-8. If another plugin makes attempts to change the blog_charset, it would definitely impact mbstring functionality.

All of that being said, my best guess at this point, is that the string being processed by WordPress/s2Member is NOT valid UTF-8, for whatever reason. Is it possible that you copied/pasted some of those é characters from an editor that was NOT using UTF-8? Or, are any of your on-site forms collecting data in a different charset perhaps?

Re: Strange symbols

PostPosted: October 18th, 2011, 7:08 am
by le formateur
Hello,

We speak about the variable "%%full_name%%". This is not a charset problem because the problem is only for s2member. I have no problem with accents with my personal mail and others. I really think the problem is related to the variable. I do not copy and paste. In addition with "Hervé" or another word with an accent instead of the variable ("%%full_name%%") there is no problem.

Thank you for your help.

Re: Strange symbols

PostPosted: October 19th, 2011, 10:11 pm
by Jason Caldwell
Thanks for your follow-up.
In this particular instance, I am stumped. If anyone else has ideas, please let me know.