-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange characters in HTML mails on iOS #59
Comments
This is bound to be an encoding issue somewhere, whether in the page where users enter their content, how it's submitted to PHPMailer, or the settings you're using in PHPMailer. PHPMailer defaults to the ISO-8859-1 charset so unless you're changing that you're probably looking at a latin1 to UTF-8 mismatch. |
Thanks for the quick response! Users can edit the content via the built in WordPress editor (TinyMCE). This causes often some strange markup especially when pasting from Word or similar. But I'm really curios why the exact mail looks ok on my iphone while it breaks on the users one? I can't change encoding on my device |
On 14 May 2013, at 16:11, revaxarts notifications@github.com wrote:
I'd say the most likely source of the problem is TinyMCE. Try doing some experiments with specific characters in different encodings and see how they come out. Marcus |
Ok, I'll do! Thanks Marcus! You did a great job! |
Hi, Which character are displayed? What User Agent Do your customers use? Do you specify the mime Type charset? -- ooxi Violetland — An open source cross-platform game similar to Crimsonland — http://violetland.github.com revaxarts notifications@github.com schrieb:
|
Mostly these "A" characters - (http://ticksy_attachments.s3.amazonaws.com/5765101190.png) Which user agent? It's an iPhone 4 with iOS 6.1.x As mentioned the same email looks fine on my (same) device |
Those characters indicate that you're displaying UTF-8 encoded text in an 8-bit Windows-1252 charset. See this page for a map: http://www.i18nqa.com/debug/utf8-debug.html For example in the title you have the sequence Interesting carrier you have! |
It's the phone and the screenshot from a user (obviously an iPhone 5 but have others with same issue). The "A"s should be I'm not that much familiar with different charsets and thought utf-8 is the way to go without problems |
Hi, UTF-8 is the way to go. Are you sure you Set the correct Content Type (Text/plain; charset=utf-8)? -- ooxi Violetland — An open source cross-platform game similar to Crimsonland — http://violetland.github.com revaxarts notifications@github.com schrieb:
|
Every html mail has this header: I set Charset to utf-8: I use |
That may be true, but if your'e providing it with content that uses the Windows-1252 charset, you'll get the problem you're seeing. Try using mb_convert_encoding to convert your content to UTF-8 first - that's not something that is up to PHPMailer. |
Ok thanks Marcus! I'm using this snippet now:
let's see if this works |
Seems the above method doesn't work. I have again a customer with this issue. Here is the customers screenshot He sad if he switches to turkish the email is fine but not with English. My phone is running with English as well. I'm sorry to post this as an issue cause it'S probably not related to phpMailer. but I hope I'll find an answer here. |
Somewhere you're still using the Windows charset. You need to track that down. For the most part, UTF-8 doesn't care what language your'e using, it's all just characters; having it fail when switching to a non-matching language suggests there's an 8-bit charset in use, which will fail as you're seeing. When comparing devices, it's best to use BCC to send the messages to multiple recipients rather than sending them separate messages, then you know they are receiving copies of the exact same message, which are thus comparable. |
Could you please post the message itself here? It sould look something like
|
|
The real content of |
seem legit :) I've just copied and paste parts of the content: Text
HTML
|
Lets play "spot the 8-bit character set"... |
I saw them, I just tested it with ÄÖÜ and got Ã�Ã�Ã� Why this doesn't help?
|
This might not be a problem now but I suggest using Content-Transfer-Encoding Base64 or quoted printable even for text/plain and text/html parts. Not all mail servers are 8bit stable now. Could you post the hex values of |
How should I do that? I'll offer an option to set CharSet and Encoding in the next update. I think this should solve this issue. I think we can close this issue for now. I'll test it with these particular users. Thanks so much for your effort! I really appreciate that! |
UTF-8 can handle (almost) all characters but your input has to be valid UTF-8. You cannot just send an arbitrary blob labelled UTF-8 and hope the conversion will be done by magic gnomes ;) |
This isnt a real issue rather a question.
I'm using phpMailer in a WordPress plugin and send HTML mails. This works very well. But unfortunataly some users have these strange characters on german Umlauts and the for instance.
This normally happens when using a different charset rather than UTF-8 but this is not the case. I don't allow users to change that and as long they don't change the code (what they don't do) there are no hooks or filters to change it too.
The strangest thing is when they send me the exact same message to me and I have no problems on my iPhone
Has anyone experienced similar? I hardly get this support request but every time I have to say that I don't know an answer.
The text was updated successfully, but these errors were encountered: