Bug #66484 [Com]: doube encoding in html_entities()
| From: | spam2 at rhsoft dot net | Date: | Tue, 14 Jan 2014 19:10:03 +0000 |
| Subject: | Bug #66484 [Com]: doube encoding in html_entities() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-183792@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66484&edit=1
ID: 66484
Comment by: spam2 at rhsoft dot net
Reported by: spam2 at rhsoft dot net
Summary: doube encoding in html_entities()
Status: Feedback
Type: Bug
Package: Scripting Engine problem
PHP Version: 5.5.8
Block user comment: N
Private report: N
New Comment:
you lose that bet (at least partly)
well, there is only one entity only god knows
where it came from because the entered data
are for sure not entity encoded in the source
otherwise ü would also be ü in the DB
+---------------------------------+
| s2titel |
+---------------------------------+
| Hasta Güvenliği Platformu |
+---------------------------------+
1 row in set (0.00 sec)
htmlentities: Hasta ve Çalışan Güvenliği
browser display in the input-filed: Hasta ve Ãalışan Güvenliği
as you can see there are more entities than expected
Previous Comments:
------------------------------------------------------------------------
[2014-01-14 18:28:44] requinix@php.net
Go into your database and look at the value directly. I bet you it has
Hasta ve Ãalışan Güvenliği
------------------------------------------------------------------------
[2014-01-14 10:39:32] spam2 at rhsoft dot net
Description:
------------
Input: Hasta ve ÃalıÅan GüvenliÄi
Output: Hasta ve Çalışan Güvenliği
ı must be ı
Test script:
---------------
htmlentities($text, ENT_QUOTES, 'ISO8859-1');
$text comes from a MySQL database
yes, i know that this must not be handeled with ISO-8859-1
but that is no reason for double entities at all
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66484&edit=1