Home » HTML » HTML_AJAX » Bug #9835
HTML_AJAX.replace charset faled
Details
| Submitted | 2007-01-15 11:36 UTC |
|---|---|
| From | dobes at lnx dot cz |
| Status | Wont fix |
| Package | HTML_AJAX |
| PHP Version | Irrelevant |
| OS | winXP |
| Roadmaps | (Not assigned) |
Comments
[2007-01-15 11:36 UTC] dobes at lnx dot cz
Description:
------------
When I use HTML_AJAX.replace for rendering some content using charset iso8859-2, the non ASCII chars are not displayed well.
The data source I use generate the same charset.
Test script:
---------------
...
HTML_AJAX.replace('target','/get_data.php');
...
ě¨čř¸ýåĂĂŠĂşůĂłňďťĚÂŚČŘ´ĂĂĂĂĂŇĎŤ
</body>
and get_data.php contains (in the same charset)
<?php
echo 'ě¨čř¸ýåĂĂŠĂşůĂłňďťĚÂŚČŘ´ĂĂĂĂĂŇĎŤ';
?>
Expected result:
----------------
ě¨čř¸ýåĂĂŠĂşůĂłňďťĚÂŚČŘ´ĂĂĂĂĂŇĎŤ
ě¨čř¸ýåĂĂŠĂşůĂłňďťĚÂŚČŘ´ĂĂĂĂĂŇĎŤ
Actual result:
--------------
Each line in different encoding.
[2007-01-15 11:40 UTC] dobes at lnx dot cz
As I see the non ASCII chars are transformed into html entities. So for test string look to the http://en.wikipedia.org/wiki/Czech_alphabet article.
Pavel
[2007-01-15 16:41 UTC] jeichorn at php dot net
Are you setting the encoding in the Content-type header, JavaScript doesn't look at the meta tag
[2007-01-16 21:29 UTC] dobes at lnx dot cz
I add Content-Type: text/html; charset=ISO-8859-2 header in both sites and now it works in Mozilla FireFox well.
But Internet Explorer(ver.6) has still the same problem.
Sorry for late resonse
Pavel