Re: Problem changing file encoding

From: Date: Wed, 22 Oct 2008 12:00:54 +0000
Subject: Re: Problem changing file encoding
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-282245@lists.php.net to get a copy of this message
A neat way to transcode between different encodings is htmlentities and html_entity_decode [1, 2] EXAMPLE: <?php # encode a string in UTF-8 to html entities $string = 'øæåöäü'; $string = htmlentities($string, ENT_QUOTES, 'UTF-8'); # transcode it into ISO-8859-15 $string = html_entity_decode($string, ENT_QUOTES, 'ISO-8859-15'); ?> There was a user with a similar problem at phpbuilder forums [3]. Have a closer look at it. [1] http://us2.php.net/manual/en/function.htmlentities.php [2] http://us2.php.net/manual/en/function.html-entity-decode.php [3] http://www.phpbuilder.com/board/archive/index.php/t-10334612.html

« previous php.general (#282245) next »