Re: how can I decode such a string ?

From: Date: Tue, 27 Jun 2006 15:56:35 +0000
Subject: Re: how can I decode such a string ?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-238728@lists.php.net to get a copy of this message
Al wrote:
nicolas figaro wrote:
Hi, I'd like to convert a string generated by a mail client like the following one : "test nf =?ISO-8859-15?Q?=E9_123456789012?=" back to the original one "test nf é 123456789012". Is there a (simple) way to do this ? thanks N F
Yes, with a regex expression excuse me? How would one do that? please explain... (really interested now).
As to answer the question; your string is in a so-called 'quoted-printable' format. (usually used in emails, among others). In PHP there are a couple of functions you could use to decode this back to an ISO-8859-15 string (as per your example), please have a look at http://www.php.net/quoted_printable_decode for more info - tul

« previous php.general (#238728) next »