PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_AJAX » Bug #9835

HTML_AJAX.replace charset faled

Details

Submitted2007-01-15 11:36 UTC
Fromdobes at lnx dot cz
StatusWont fix
PackageHTML_AJAX
PHP VersionIrrelevant
OSwinXP
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