Re: Text encoding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 5:47 PM -0600 3/27/06, David.Martinez@xxxxxxxxxxxx wrote:
Hi everybody.

I'm currently using a PHP script to download messages through a POP3
connection (with fsockopen()). Messages are pooled and classified into my
application (a help desk manager). As long as we use a lot of accents in
spanish: á, é, í, ó, ú, ñ; those characters appears as =F1, =E9, =ED, =F3,
etc.

What type of encoding is it ?
Which PHP function should I use to decode it ?

David:

The encoding is Unicode code points.

00F1 is HEX for ñ
00E9 is HEX for é
00ED is HEX for í

and so on.

To decode, it's:

<?php
$result = chr(hexdec(<whatever HEX value));
echo $result;
?>

However, to display it, you have to have a font capable of displaying the code point.

HTH's

tedd
--
--------------------------------------------------------------------------------
http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux