Re: mail() encoding problems



Hello,

on 08/23/2007 04:27 PM amygdala said the following:
I understand this. But the point I am trying to bring across, most likely I
wasn't too clear on that, is that I don't use UTF-8 encoding anywhere
anymore. I only used it once or twice, to see if that would solve my
problem. But to be very clear about it: I removed all utf8_encode()
functions, and my code is therefor back to it's usual state. But my problem
remains the same:

Sometimes the unintended

ëèï

sometimes the intended

ëèï

It seems to happen pretty random.

Therefor I am still stunned as to what could be causing this problem. It
looks as if something (maybe some mail gateway?) is transforming my e-mails
to UTF-8.

Do you have any other idea of what might be going on here? Your insights are
very welcome.

Could you be taking the text for the message from user submitted forms?

If so, make sure you set the encoding of the page that exhibit the forms
to an explicit value. If you do not do that, keep in mind that different
browsers assume different default character encodings. That could
explain why sometimes you get the encoding right and other times you don't.

If that is not the problem, consider using the class that I recommended
you and see if you still have the problem.

http://www.phpclasses.org/mimemessage


--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
.



Relevant Pages

  • Re: Best way to check if a given encoding (code point) is available in the system?
    ... Unicode UTF-16 encoding, because every valid UTF-8 encoding has a valid UTF-16 encoding. ... You can pass an empty string to the functions, but it is not clear why this would make ...
    (microsoft.public.vc.mfc)
  • Re: Posting from HTML form to WebForm
    ... The problem is that the HTML page uses its own encoding to submit the ... i.e. save it with UTF-8 encoding and add a ... specify the encoding of form data regardless of the page's own encoding ... but this attribute lacks proper browser support. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Posting from HTML form to WebForm
    ... > The problem is that the HTML page uses its own encoding to submit the ... i.e. save it with UTF-8 encoding and add a ... > specify the encoding of form data regardless of the page's own encoding ... but this attribute lacks proper browser support. ...
    (microsoft.public.dotnet.framework.aspnet)
  • How to create python codecs?
    ... I need utf-8 to utf-8 encoding which would change the text ... I`ve tried create simple utf to utf codec for some symbols but it ... def encode: ...
    (comp.lang.python)