I cannot manage correct HTML encoding, here is the example from the 
$trans = get_html_translation_table(HTML_ENTITIES);
$str = "Hallo & <Frau> & Krämer";
$encoded = strtr($str, $trans);
The $encoded variable will now contain: "Hallo &amp; &lt;Frau&gt; &amp; 
If I do exactly the same, I get:
"Hallo &amp; &lt;Frau&gt; &amp; Krämer"
Ampersand and brackets are encoded, not the german umlaut.

I tried some other chars too. Got nothing useable, some chars translated 
wrong. In fact just few special characters are encoded. Tested on MacOSX 
and Linux. Got different displays in the browser, but generally the same 
behavior - the translation does not work properly. If I list the 
translation table HTML_ENTITIES in the browser, source code shows me the 
correct encoding...

Any tips?


PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to