The implementation of entity class is based on entity::$_entities['cp1251']. The key is
named cp1251 (Windows-1251) but the translation is actually for
Windows-1252. In the map, the code point 'x80' is mapped on the code
point x20AC (Euro sign in UCS-2). This mapping is for Windows-1252, not
In detail, please refer to this URLs.
In core scripts, entity class is referred by stringToAttribute() and
stringToXML() in globalfunctions.php. These two functions are referred
by ACTIONS, ITEMACTIONS and COMMENTACTIONS class. The purpose is convert
entities for output.
I read W3C reccomendations for HTML 4.01/XML fifth edition/XHTML 1.0 and
realized the differences are:
1. XML/XHTML cannot include decimal numeric character but HTML can both
2. For 'apostrophe', use '/' instead of ' in HTML but
XML/XHTML can use '/'
I think we can use i18n::hen() and i18n::hsc() with a bit modification
instead of stringToAttribute() and stringToXML(). Then these two
functions and entity class are not used and can be deprecated.