php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51490 html_entity_encode() doesn't work with windows-1251
Submitted: 2010-04-06 23:20 UTC Modified: 2018-07-23 15:06 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: sandel at ukr dot net Assigned: cmb (profile)
Status: Not a bug Package: Strings related
PHP Version: 5.3.2 OS: linux SuSE 11.2
Private report: No CVE-ID: None
 [2010-04-06 23:20 UTC] sandel at ukr dot net
Description:
------------
html_entity_encode() doesn't work with windows-1251 with php 5.3.2....

BUT!!!! It works with latest PHP 5.2.X

Test script:
---------------
<?php


echo html_entity_decode( "&#xC7;&#xE0;&#xFF;&#xE2;&#xEA;&#xE0;", ENT_QUOTES, 'cp1251');

// output will be &#xC7;&#xE0;&#xFF;&#xE2;&#xEA;&#xE0;

?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-04-22 01:46 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: moriyoshi
 [2017-10-24 06:33 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: moriyoshi +Assigned To:
 [2018-07-23 15:06 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Package: *Spelling functions +Package: Strings related -Assigned To: +Assigned To: cmb
 [2018-07-23 15:06 UTC] cmb@php.net
The html entity &#xC7; denotes the character Ç[1], which is not
representable in CP-1252.

> BUT!!!! It works with latest PHP 5.2.X

Indeed, since this bug has only been fixed as of PHP 5.3.0[2].

[1] <https://dev.w3.org/html5/html-author/charref>
[2] <http://git.php.net/?p=php-src.git;a=commit;h=23e3baf>
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Dec 13 10:01:24 2019 UTC