Re: Text encoding

From: Date: Tue, 28 Mar 2006 01:00:23 +0000
Subject: Re: Text encoding
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-232690@lists.php.net to get a copy of this message
At 5:47 PM -0600 3/27/06, David.Martinez@eurorscg.com 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

« previous php.general (#232690) next »