PHP Classes

Little-endian UTF-16 Unicode text

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  Little-endian UTF-16 Unicode text  >  (Un) Subscribe thread alerts  
Subject: Little-endian UTF-16 Unicode text
Summary:Little-endian UTF-16 Unicode text
Messages:3
Author:James Henderson
Date:2012-05-20 18:00:55
Update:2012-05-21 08:08:33
 

  1. Little-endian UTF-16 Unicode text   Reply   Report abuse  
Picture of James Henderson James Henderson - 2012-05-20 18:00:55
Hi,

I have attachments with in Little-endian UTF-16 Unicode text format, and they get all jumbled up after decoding.

Do you have any hints to what might be happening here?

  2. Re: Little-endian UTF-16 Unicode text   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2012-05-20 21:56:46 - In reply to message 1 from James Henderson
The class does not alter the encoding of any message data.

If you receive messages with UTF-16 encoded text, the class just return the originally encoded strings. It is up to your application to use or display that text somewhere converting the encoding or not as you feel it is appropriate.

This means if you want to display the message UTF-16 encoded text in a Web page, you may need to send proper page content-type headers or add equivalent <meta> tags.

If the page needs to use the some other encoding, say UTF-8, you need to convert the encoding of the parsed message text yourself with some PHP text encoding conversion functions.

  3. Re: Little-endian UTF-16 Unicode text   Reply   Report abuse  
Picture of James Henderson James Henderson - 2012-05-21 08:08:33 - In reply to message 2 from Manuel Lemos
Ok great thanks, I have converted it to UTF-8 and it displays correctly now.


Cheers