|  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
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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
34 + 16 = ?
Subscribe to this entry?

 [2010-04-06 23:20 UTC] sandel at ukr dot net
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:

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

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



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-04-22 01:46 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: moriyoshi
 [2017-10-24 06:33 UTC]
-Status: Assigned +Status: Open -Assigned To: moriyoshi +Assigned To:
 [2018-07-23 15:06 UTC]
-Status: Open +Status: Not a bug -Package: *Spelling functions +Package: Strings related -Assigned To: +Assigned To: cmb
 [2018-07-23 15:06 UTC]
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] <>
[2] <;a=commit;h=23e3baf>
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 13:01:32 2024 UTC