Re: html_entity_decode is trying to kill me

From: Date: Fri, 17 Feb 2012 17:18:21 +0000
Subject: Re: html_entity_decode is trying to kill me
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-316713@lists.php.net to get a copy of this message
On Fri, Feb 17, 2012 at 5:00 PM, Marc Guay <marc.guay@gmail.com> wrote: > Hi, > > So I decided to give one of those PHP math classes a go and have come > across a joyful character encoding problem.  He's the deal: > > $rule = "1 &lt; 2"; > $rule = html_entity_decode($rule, ENT_QUOTES, 'UTF-8'); > echo $rule; > > And the result is still "1 &lt; 2".  I've tried different combinations > of character encodings and quotings, to no avail.  Any ideas of where > I should look for the culprit? > > Marc > This piece of code is working perfectly fine on my Ubuntu PHP 5.3.6. (I get 1 < 2 ). Can you post some information about your system, eg PHP version, Apache version, Operating System, OS language? - Matijn

« previous php.general (#316713) next »