Re: HTML equivalents of accented characters

From: Date: Thu, 14 Aug 2003 14:10:45 +0000
Subject: Re: HTML equivalents of accented characters
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-159578@lists.php.net to get a copy of this message
To change "é" to "&eacute;" you need htmlentities(), not htmlspecialchars as the latter only translates ampersands (&), double quotes, less than en greater than characters (Single quotes are not translated by default). If htmlentities does not work, what does a var_dump on your $translationtable send back? Ivo "Liam Gibbs" <liamgibbs@sympatico.ca> wrote in message news:00c901c3626d$22a0d9b0$4d59fea9@TeletranOne... > > I have no idea what might be the problem, what does your translation table > > look like? > > Mine is still coming out as a single character. Here's my code, in case > anyone can spot any stupid human error blunder I'm making: > > $translationtable = get_html_translation_table(HTML_ENTITIES); > $string = htmlspecialchars($string); > > Also, here's my setup, just in case: > PHP 4.3.1 > Linux 2.2.19 #1 i586 > Apache 1.3.27 > MySQL 3.23.49 (don't know what this has to do with it, but just in case > there has been some interference with PHP and MySQL) > GD 2.0 compatible >

« previous php.general (#159578) next »