php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35818 htmlentities bug with a greek string
Submitted: 2005-12-27 15:01 UTC Modified: 2005-12-29 08:11 UTC
From: d dot gourgues at neuf dot fr Assigned:
Status: Not a bug Package: Strings related
PHP Version: 5.1.1 OS: Debian
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: d dot gourgues at neuf dot fr
New email:
PHP Version: OS:

 

 [2005-12-27 15:01 UTC] d dot gourgues at neuf dot fr
Description:
------------
Hi, 
htmlentities works very well but with this string
"Σερβία και Μαυροβούνιο"
php give me a blank page

Reproduce code:
---------------
htmlentities(
html_entity_decode(
"Σερβία και Μαυροβούνιο"
, ENT_QUOTES, "UTF-8")
, ENT_QUOTES, "UTF-8");


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-27 15:09 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip


 [2005-12-27 15:10 UTC] tony2001@php.net
If you're still able to reproduce it - please put the code somewhere in the net and paste the link here.
 [2005-12-27 15:58 UTC] d dot gourgues at neuf dot fr
I can't install this php version at work, so i can't answer.

I just make a precision. This bug append when u write in a only line :
echo htmlentities(html_entity_decode("Σερβία και
Μαυροβούνιο"
, ENT_QUOTES, "UTF-8"), ENT_QUOTES, "UTF-8");

Add a space between α and κ
and between ι and Μ
 [2005-12-27 16:09 UTC] tony2001@php.net
>I can't install this php version at work
You don't to install it, you just need to compile and test it.

Please upload the test case as I asked.
 [2005-12-27 16:13 UTC] sniper@php.net
Remove the 'utf-8' from those funcs and it works fine. 

 [2005-12-29 08:11 UTC] d dot gourgues at neuf dot fr
I failed to install php5.1-win32-latest.zip. I've "Unable to initialize module". I installed wamp server at home with php5.0.1 and htmlentities works.
I can't remove UTF-8 because greek strings come from database (html_entity_decode is just to reproduce errors)

so, i patched my function
if ($greek == "Serbia kai maurobounio") return $greek;
else return htmlentities($greek, ENT_QUOTES, "UTF-8");
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 16:01:28 2024 UTC