Edit report at http://bugs.php.net/bug.php?id=47798&edit=1

 ID:                 47798
 Updated by:         cataphr...@php.net
 Reported by:        f4ckm5 at web dot de
 Summary:            html_entity_decode() not covering Z/z with caron for
                     Windows-1252
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
-Package:            Feature/Change Request
+Package:            *General Issues
 Operating System:   Windows
 PHP Version:        5.2.9
-Assigned To:        
+Assigned To:        cataphract
 Block user comment: N

 New Comment:

This has been partially fixed in trunk. The result is:



string(8) "Ž"

string(1) "�"

string(1) "�"

string(8) "ž"

string(1) "�"

string(1) "�"

string(1) "�"

string(1) "�" 



ž and Ž are not supported because I can't find those in
the entities for HTML or XHTML:



See http://www.w3.org/TR/2002/REC-xhtml1-20020801/dtds.html#h-A2
(XHTML)



HTML 4.01:

http://www.w3.org/TR/html4/HTMLlat1.ent

http://www.w3.org/TR/html4/HTMLsymbol.ent

http://www.w3.org/TR/html4/HTMLspecial.ent


Previous Comments:
------------------------------------------------------------------------
[2009-03-27 01:05:35] f4ckm5 at web dot de

Description:
------------
html_entity_decode should decode "LATIN CAPITAL LETTER Z WITH CARON"
Ž Ž Ž to (int)142, hex(8E) for Windows-1252

html_entity_decode should decode "LATIN SMALL LETTER Z WITH CARON"
ž ž ž to (int)158, hex(9E) for Windows-1252



htmlentities should encode the respective characters to Ž and
ž (ž and Ž is not well supported by most browsers)

Reproduce code:
---------------
var_dump(html_entity_decode("Ž", ENT_QUOTES, "Windows-1252"));

var_dump(html_entity_decode("Ž", ENT_QUOTES, "Windows-1252"));

var_dump(html_entity_decode("Ž", ENT_QUOTES, "Windows-1252"));

var_dump(html_entity_decode("ž", ENT_QUOTES, "Windows-1252"));

var_dump(html_entity_decode("ž", ENT_QUOTES, "Windows-1252"));

var_dump(html_entity_decode("ž", ENT_QUOTES, "Windows-1252"));

var_dump(htmlentities(chr(142), ENT_QUOTES, "Windows-1252", true));

var_dump(htmlentities(chr(158), ENT_QUOTES, "Windows-1252", true));

Expected result:
----------------
string(1) "Ž"

string(1) "Ž"

string(1) "Ž"

string(1) "ž"

string(1) "ž"

string(1) "ž"

string(6) "Ž"

string(6) "ž"

Actual result:
--------------
string(8) "Ž"

string(6) "Ž"

string(7) "Ž"

string(8) "ž"

string(6) "ž"

string(7) "ž"

string(1) "Ž"

string(1) "ž"




------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=47798&edit=1

Reply via email to