Re: Problem changing file encoding

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

 



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

-- 
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