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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sandel at ukr dot net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC