- Fix bug #46478 (htmlentities() uses obsolete mapping table for character
authorMoriyoshi Koizumi <moriyoshi@php.net>
Tue, 22 Dec 2009 05:50:34 +0000 (05:50 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Tue, 22 Dec 2009 05:50:34 +0000 (05:50 +0000)
  entity references)

NEWS
ext/standard/html.c
ext/standard/tests/strings/html_entity_decode_html4.phpt [new file with mode: 0644]
ext/standard/tests/strings/htmlentities_html4.phpt [new file with mode: 0644]

diff --git a/NEWS b/NEWS
index aa955de61575227356c9573a87a4d9a2cf475f47..ec9b007cd542876a93f230dba28895b96b8b6058 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -134,6 +134,8 @@ PHP                                                                        NEWS
 - Fixed bug #49174 (crash when extending PDOStatement and trying to set
   queryString property). (Felipe)
 - Fixed bug #47848 (importNode doesn't preserve attribute namespaces). (Rob)
+- Fixed bug #46478 (htmlentities() uses obsolete mapping table for character
+  entity references). (Moriyoshi)
 - Fixed bug #45599 (strip_tags() truncates rest of string with invalid
   attribute). (Ilia, hradtke)
 - Fixed bug #45120 (PDOStatement->execute() returns true then false for same
index 9fc8c3a01907fe883687297730b30bee8fe9b19d..747796a06630e4f164a1cb345abd2450ae4e619b 100644 (file)
@@ -144,7 +144,7 @@ static entity_table_t ent_uni_greek[] = {
        NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        "thetasym", "upsih",
        NULL, NULL, NULL,
-       "piv" 
+       "piv"
 };
 
 static entity_table_t ent_uni_punct[] = {
@@ -154,7 +154,7 @@ static entity_table_t ent_uni_punct[] = {
        NULL, NULL, NULL, "ndash", "mdash", NULL, NULL, NULL,
        /* 8216 */
        "lsquo", "rsquo", "sbquo", NULL, "ldquo", "rdquo", "bdquo", NULL,
-       "dagger", "Dagger",     "bull", NULL, NULL, NULL, "hellip",
+       "dagger", "Dagger", "bull", NULL, NULL, NULL, "hellip",
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "permil", NULL,
        /* 8242 */
        "prime", "Prime", NULL, NULL, NULL, NULL, NULL, "lsaquo", "rsaquo", NULL,
@@ -194,39 +194,39 @@ static entity_table_t ent_uni_8592_9002[] = {
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        /* 8656 (0x21d0) */
-       "lArr", "uArr", "rArr", "dArr", "hArr", "vArr", NULL, NULL,
-       NULL, NULL, "lAarr", "rAarr", NULL, "rarrw", NULL, NULL,
+       "lArr", "uArr", "rArr", "dArr", "hArr", NULL, NULL, NULL,
+       NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        /* 8672 (0x21e0) */
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        /* 8704 (0x2200) */
-       "forall", "comp", "part", "exist", "nexist", "empty", NULL, "nabla",
-       "isin", "notin", "epsis", "ni", "notni", "bepsi", NULL, "prod",
+       "forall", NULL, "part", "exist", NULL, "empty", NULL, "nabla",
+       "isin", "notin", NULL, "ni", NULL, NULL, NULL, "prod",
        /* 8720 (0x2210) */
-       "coprod", "sum", "minus", "mnplus", "plusdo", NULL, "setmn", "lowast",
-       "compfn", NULL, "radic", NULL, NULL, "prop", "infin", "ang90",
+       NULL, "sum", "minus", NULL, NULL, NULL, NULL, "lowast",
+       NULL, NULL, "radic", NULL, NULL, "prop", "infin", NULL,
        /* 8736 (0x2220) */
-       "ang", "angmsd", "angsph", "mid", "nmid", "par", "npar", "and",
-       "or", "cap", "cup", "int", NULL, NULL, "conint", NULL,
+       "ang", NULL, NULL, NULL, NULL, NULL, NULL, "and",
+       "or", "cap", "cup", "int", NULL, NULL, NULL, NULL,
        /* 8752 (0x2230) */
-       NULL, NULL, NULL, NULL, "there4", "becaus", NULL, NULL,
-       NULL, NULL, NULL, NULL, "sim", "bsim", NULL, NULL,
+       NULL, NULL, NULL, NULL, "there4", NULL, NULL, NULL,
+       NULL, NULL, NULL, NULL, "sim", NULL, NULL, NULL,
        /* 8768 (0x2240) */
-       "wreath", "nsim", NULL, "sime", "nsime", "cong", NULL, "ncong",
-       "asymp", "nap", "ape", NULL, "bcong", "asymp", "bump", "bumpe",
+       NULL, NULL, NULL, NULL, NULL, "cong", NULL, NULL,
+       "asymp", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        /* 8784 (0x2250) */
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        /* 8800 (0x2260) */
-       "ne", "equiv", NULL, NULL, "le", "ge", "lE", "gE",
-       "lnE", "gnE", "Lt", "Gt", "twixt", NULL, "nlt", "ngt",
+       "ne", "equiv", NULL, NULL, "le", "ge", NULL, NULL,
+       NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        /* 8816 (0x2270) */
-       "nles", "nges", "lsim", "gsim", NULL, NULL, "lg", "gl",
-       NULL, NULL, "pr", "sc", "cupre", "sscue", "prsim", "scsim",
+       NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+       NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        /* 8832 (0x2280) */
-       "npr", "nsc", "sub", "sup", "nsub", "nsup", "sube", "supe",
+       NULL, NULL, "sub", "sup", "nsub", NULL, "sube", "supe",
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        /* 8848 (0x2290) */
        NULL, NULL, NULL, NULL, NULL, "oplus", NULL, "otimes",
diff --git a/ext/standard/tests/strings/html_entity_decode_html4.phpt b/ext/standard/tests/strings/html_entity_decode_html4.phpt
new file mode 100644 (file)
index 0000000..3c92bf6
--- /dev/null
@@ -0,0 +1,516 @@
+--TEST--
+html_entity_decode() conformance check (HTML 4)
+--FILE--
+<?php
+$map = array(
+    "&quot;",
+    "&amp;",
+    "&lt;",
+    "&gt;",
+    "&nbsp;",
+    "&iexcl;",
+    "&cent;",
+    "&pound;",
+    "&curren;",
+    "&yen;",
+    "&brvbar;",
+    "&sect;",
+    "&uml;",
+    "&copy;",
+    "&ordf;",
+    "&laquo;",
+    "&not;",
+    "&shy;",
+    "&reg;",
+    "&macr;",
+    "&deg;",
+    "&plusmn;",
+    "&sup2;",
+    "&sup3;",
+    "&acute;",
+    "&micro;",
+    "&para;",
+    "&middot;",
+    "&cedil;",
+    "&sup1;",
+    "&ordm;",
+    "&raquo;",
+    "&frac14;",
+    "&frac12;",
+    "&frac34;",
+    "&iquest;",
+    "&Agrave;",
+    "&Aacute;",
+    "&Acirc;",
+    "&Atilde;",
+    "&Auml;",
+    "&Aring;",
+    "&AElig;",
+    "&Ccedil;",
+    "&Egrave;",
+    "&Eacute;",
+    "&Ecirc;",
+    "&Euml;",
+    "&Igrave;",
+    "&Iacute;",
+    "&Icirc;",
+    "&Iuml;",
+    "&ETH;",
+    "&Ntilde;",
+    "&Ograve;",
+    "&Oacute;",
+    "&Ocirc;",
+    "&Otilde;",
+    "&Ouml;",
+    "&times;",
+    "&Oslash;",
+    "&Ugrave;",
+    "&Uacute;",
+    "&Ucirc;",
+    "&Uuml;",
+    "&Yacute;",
+    "&THORN;",
+    "&szlig;",
+    "&agrave;",
+    "&aacute;",
+    "&acirc;",
+    "&atilde;",
+    "&auml;",
+    "&aring;",
+    "&aelig;",
+    "&ccedil;",
+    "&egrave;",
+    "&eacute;",
+    "&ecirc;",
+    "&euml;",
+    "&igrave;",
+    "&iacute;",
+    "&icirc;",
+    "&iuml;",
+    "&eth;",
+    "&ntilde;",
+    "&ograve;",
+    "&oacute;",
+    "&ocirc;",
+    "&otilde;",
+    "&ouml;",
+    "&divide;",
+    "&oslash;",
+    "&ugrave;",
+    "&uacute;",
+    "&ucirc;",
+    "&uuml;",
+    "&yacute;",
+    "&thorn;",
+    "&yuml;",
+    "&OElig;",
+    "&oelig;",
+    "&Scaron;",
+    "&scaron;",
+    "&Yuml;",
+    "&fnof;",
+    "&circ;",
+    "&tilde;",
+    "&Alpha;",
+    "&Beta;",
+    "&Gamma;",
+    "&Delta;",
+    "&Epsilon;",
+    "&Zeta;",
+    "&Eta;",
+    "&Theta;",
+    "&Iota;",
+    "&Kappa;",
+    "&Lambda;",
+    "&Mu;",
+    "&Nu;",
+    "&Xi;",
+    "&Omicron;",
+    "&Pi;",
+    "&Rho;",
+    "&Sigma;",
+    "&Tau;",
+    "&Upsilon;",
+    "&Phi;",
+    "&Chi;",
+    "&Psi;",
+    "&Omega;",
+    "&alpha;",
+    "&beta;",
+    "&gamma;",
+    "&delta;",
+    "&epsilon;",
+    "&zeta;",
+    "&eta;",
+    "&theta;",
+    "&iota;",
+    "&kappa;",
+    "&lambda;",
+    "&mu;",
+    "&nu;",
+    "&xi;",
+    "&omicron;",
+    "&pi;",
+    "&rho;",
+    "&sigmaf;",
+    "&sigma;",
+    "&tau;",
+    "&upsilon;",
+    "&phi;",
+    "&chi;",
+    "&psi;",
+    "&omega;",
+    "&thetasym;",
+    "&upsih;",
+    "&piv;",
+    "&ensp;",
+    "&emsp;",
+    "&thinsp;",
+    "&zwnj;",
+    "&zwj;",
+    "&lrm;",
+    "&rlm;",
+    "&ndash;",
+    "&mdash;",
+    "&lsquo;",
+    "&rsquo;",
+    "&sbquo;",
+    "&ldquo;",
+    "&rdquo;",
+    "&bdquo;",
+    "&dagger;",
+    "&Dagger;",
+    "&bull;",
+    "&hellip;",
+    "&permil;",
+    "&prime;",
+    "&Prime;",
+    "&lsaquo;",
+    "&rsaquo;",
+    "&oline;",
+    "&frasl;",
+    "&euro;",
+    "&image;",
+    "&weierp;",
+    "&real;",
+    "&trade;",
+    "&alefsym;",
+    "&larr;",
+    "&uarr;",
+    "&rarr;",
+    "&darr;",
+    "&harr;",
+    "&crarr;",
+    "&lArr;",
+    "&uArr;",
+    "&rArr;",
+    "&dArr;",
+    "&hArr;",
+    "&forall;",
+    "&part;",
+    "&exist;",
+    "&empty;",
+    "&nabla;",
+    "&isin;",
+    "&notin;",
+    "&ni;",
+    "&prod;",
+    "&sum;",
+    "&minus;",
+    "&lowast;",
+    "&radic;",
+    "&prop;",
+    "&infin;",
+    "&ang;",
+    "&and;",
+    "&or;",
+    "&cap;",
+    "&cup;",
+    "&int;",
+    "&there4;",
+    "&sim;",
+    "&cong;",
+    "&asymp;",
+    "&ne;",
+    "&equiv;",
+    "&le;",
+    "&ge;",
+    "&sub;",
+    "&sup;",
+    "&nsub;",
+    "&sube;",
+    "&supe;",
+    "&oplus;",
+    "&otimes;",
+    "&perp;",
+    "&sdot;",
+    "&lceil;",
+    "&rceil;",
+    "&lfloor;",
+    "&rfloor;",
+    "&lang;",
+    "&rang;",
+    "&loz;",
+    "&spades;",
+    "&clubs;",
+    "&hearts;",
+    "&diams;",
+);
+
+foreach ($map as $str) {
+    echo bin2hex(html_entity_decode($str, ENT_QUOTES, "UTF-8")), "\n";
+}
+?>
+--EXPECT--
+22
+26
+3c
+3e
+c2a0
+c2a1
+c2a2
+c2a3
+c2a4
+c2a5
+c2a6
+c2a7
+c2a8
+c2a9
+c2aa
+c2ab
+c2ac
+c2ad
+c2ae
+c2af
+c2b0
+c2b1
+c2b2
+c2b3
+c2b4
+c2b5
+c2b6
+c2b7
+c2b8
+c2b9
+c2ba
+c2bb
+c2bc
+c2bd
+c2be
+c2bf
+c380
+c381
+c382
+c383
+c384
+c385
+c386
+c387
+c388
+c389
+c38a
+c38b
+c38c
+c38d
+c38e
+c38f
+c390
+c391
+c392
+c393
+c394
+c395
+c396
+c397
+c398
+c399
+c39a
+c39b
+c39c
+c39d
+c39e
+c39f
+c3a0
+c3a1
+c3a2
+c3a3
+c3a4
+c3a5
+c3a6
+c3a7
+c3a8
+c3a9
+c3aa
+c3ab
+c3ac
+c3ad
+c3ae
+c3af
+c3b0
+c3b1
+c3b2
+c3b3
+c3b4
+c3b5
+c3b6
+c3b7
+c3b8
+c3b9
+c3ba
+c3bb
+c3bc
+c3bd
+c3be
+c3bf
+c592
+c593
+c5a0
+c5a1
+c5b8
+c692
+cb86
+cb9c
+ce91
+ce92
+ce93
+ce94
+ce95
+ce96
+ce97
+ce98
+ce99
+ce9a
+ce9b
+ce9c
+ce9d
+ce9e
+ce9f
+cea0
+cea1
+cea3
+cea4
+cea5
+cea6
+cea7
+cea8
+cea9
+ceb1
+ceb2
+ceb3
+ceb4
+ceb5
+ceb6
+ceb7
+ceb8
+ceb9
+ceba
+cebb
+cebc
+cebd
+cebe
+cebf
+cf80
+cf81
+cf82
+cf83
+cf84
+cf85
+cf86
+cf87
+cf88
+cf89
+cf91
+cf92
+cf96
+e28082
+e28083
+e28089
+e2808c
+e2808d
+e2808e
+e2808f
+e28093
+e28094
+e28098
+e28099
+e2809a
+e2809c
+e2809d
+e2809e
+e280a0
+e280a1
+e280a2
+e280a6
+e280b0
+e280b2
+e280b3
+e280b9
+e280ba
+e280be
+e28184
+e282ac
+e28491
+e28498
+e2849c
+e284a2
+e284b5
+e28690
+e28691
+e28692
+e28693
+e28694
+e286b5
+e28790
+e28791
+e28792
+e28793
+e28794
+e28880
+e28882
+e28883
+e28885
+e28887
+e28888
+e28889
+e2888b
+e2888f
+e28891
+e28892
+e28897
+e2889a
+e2889d
+e2889e
+e288a0
+e288a7
+e288a8
+e288a9
+e288aa
+e288ab
+e288b4
+e288bc
+e28985
+e28988
+e289a0
+e289a1
+e289a4
+e289a5
+e28a82
+e28a83
+e28a84
+e28a86
+e28a87
+e28a95
+e28a97
+e28aa5
+e28b85
+e28c88
+e28c89
+e28c8a
+e28c8b
+e28ca9
+e28caa
+e2978a
+e299a0
+e299a3
+e299a5
+e299a6
diff --git a/ext/standard/tests/strings/htmlentities_html4.phpt b/ext/standard/tests/strings/htmlentities_html4.phpt
new file mode 100644 (file)
index 0000000..3f700e8
--- /dev/null
@@ -0,0 +1,305 @@
+--TEST--
+htmlentities() conformance check (HTML 4)
+--FILE--
+<?php
+function utf32_utf8($k) {
+       if ($k < 0x80) {
+               $retval = pack('C', $k);
+       } else if ($k < 0x800) {
+               $retval = pack('C2', 
+            0xc0 | ($k >> 6),
+            0x80 | ($k & 0x3f));
+       } else if ($k < 0x10000) {
+        $retval = pack('C3',
+            0xe0 | ($k >> 12),
+            0x80 | (($k >> 6) & 0x3f),
+            0x80 | ($k & 0x3f));
+       } else if ($k < 0x200000) {
+        $retval = pack('C4',
+            0xf0 | ($k >> 18),
+            0x80 | (($k >> 12) & 0x3f),
+            0x80 | (($k >> 6) & 0x3f),
+            0x80 | ($k & 0x3f));
+       } else if ($k < 0x4000000) {
+        $retval = pack('C5',
+            0xf8 | ($k >> 24),
+            0x80 | (($k >> 18) & 0x3f),
+            0x80 | (($k >> 12) & 0x3f),
+            0x80 | (($k >> 6) & 0x3f),
+            0x80 | ($k & 0x3f));
+       } else {
+        $retval = pack('C6',
+            0xfc | ($k >> 30),
+            0x80 | (($k >> 24) & 0x3f),
+            0x80 | (($k >> 18) & 0x3f),
+            0x80 | (($k >> 12) & 0x3f),
+            0x80 | (($k >> 6) & 0x3f),
+            0x80 | ($k & 0x3f));
+       }
+       return $retval;
+}
+
+for ($i = 0; $i < 0x110000; $i++) {
+    if ($i >= 0xd800 && $i < 0xe000)
+        continue;
+    $str = utf32_utf8($i);
+    $result = htmlentities($str, ENT_QUOTES, 'UTF-8');
+    if ($str != $result) {
+        printf("%s\tU+%05X\n", $result, $i);
+    }
+}
+?>
+--EXPECT--
+&quot; U+00022
+&amp;  U+00026
+&#039; U+00027
+&lt;   U+0003C
+&gt;   U+0003E
+&nbsp; U+000A0
+&iexcl;        U+000A1
+&cent; U+000A2
+&pound;        U+000A3
+&curren;       U+000A4
+&yen;  U+000A5
+&brvbar;       U+000A6
+&sect; U+000A7
+&uml;  U+000A8
+&copy; U+000A9
+&ordf; U+000AA
+&laquo;        U+000AB
+&not;  U+000AC
+&shy;  U+000AD
+&reg;  U+000AE
+&macr; U+000AF
+&deg;  U+000B0
+&plusmn;       U+000B1
+&sup2; U+000B2
+&sup3; U+000B3
+&acute;        U+000B4
+&micro;        U+000B5
+&para; U+000B6
+&middot;       U+000B7
+&cedil;        U+000B8
+&sup1; U+000B9
+&ordm; U+000BA
+&raquo;        U+000BB
+&frac14;       U+000BC
+&frac12;       U+000BD
+&frac34;       U+000BE
+&iquest;       U+000BF
+&Agrave;       U+000C0
+&Aacute;       U+000C1
+&Acirc;        U+000C2
+&Atilde;       U+000C3
+&Auml; U+000C4
+&Aring;        U+000C5
+&AElig;        U+000C6
+&Ccedil;       U+000C7
+&Egrave;       U+000C8
+&Eacute;       U+000C9
+&Ecirc;        U+000CA
+&Euml; U+000CB
+&Igrave;       U+000CC
+&Iacute;       U+000CD
+&Icirc;        U+000CE
+&Iuml; U+000CF
+&ETH;  U+000D0
+&Ntilde;       U+000D1
+&Ograve;       U+000D2
+&Oacute;       U+000D3
+&Ocirc;        U+000D4
+&Otilde;       U+000D5
+&Ouml; U+000D6
+&times;        U+000D7
+&Oslash;       U+000D8
+&Ugrave;       U+000D9
+&Uacute;       U+000DA
+&Ucirc;        U+000DB
+&Uuml; U+000DC
+&Yacute;       U+000DD
+&THORN;        U+000DE
+&szlig;        U+000DF
+&agrave;       U+000E0
+&aacute;       U+000E1
+&acirc;        U+000E2
+&atilde;       U+000E3
+&auml; U+000E4
+&aring;        U+000E5
+&aelig;        U+000E6
+&ccedil;       U+000E7
+&egrave;       U+000E8
+&eacute;       U+000E9
+&ecirc;        U+000EA
+&euml; U+000EB
+&igrave;       U+000EC
+&iacute;       U+000ED
+&icirc;        U+000EE
+&iuml; U+000EF
+&eth;  U+000F0
+&ntilde;       U+000F1
+&ograve;       U+000F2
+&oacute;       U+000F3
+&ocirc;        U+000F4
+&otilde;       U+000F5
+&ouml; U+000F6
+&divide;       U+000F7
+&oslash;       U+000F8
+&ugrave;       U+000F9
+&uacute;       U+000FA
+&ucirc;        U+000FB
+&uuml; U+000FC
+&yacute;       U+000FD
+&thorn;        U+000FE
+&yuml; U+000FF
+&OElig;        U+00152
+&oelig;        U+00153
+&Scaron;       U+00160
+&scaron;       U+00161
+&Yuml; U+00178
+&fnof; U+00192
+&circ; U+002C6
+&tilde;        U+002DC
+&Alpha;        U+00391
+&Beta; U+00392
+&Gamma;        U+00393
+&Delta;        U+00394
+&Epsilon;      U+00395
+&Zeta; U+00396
+&Eta;  U+00397
+&Theta;        U+00398
+&Iota; U+00399
+&Kappa;        U+0039A
+&Lambda;       U+0039B
+&Mu;   U+0039C
+&Nu;   U+0039D
+&Xi;   U+0039E
+&Omicron;      U+0039F
+&Pi;   U+003A0
+&Rho;  U+003A1
+&Sigma;        U+003A3
+&Tau;  U+003A4
+&Upsilon;      U+003A5
+&Phi;  U+003A6
+&Chi;  U+003A7
+&Psi;  U+003A8
+&Omega;        U+003A9
+&alpha;        U+003B1
+&beta; U+003B2
+&gamma;        U+003B3
+&delta;        U+003B4
+&epsilon;      U+003B5
+&zeta; U+003B6
+&eta;  U+003B7
+&theta;        U+003B8
+&iota; U+003B9
+&kappa;        U+003BA
+&lambda;       U+003BB
+&mu;   U+003BC
+&nu;   U+003BD
+&xi;   U+003BE
+&omicron;      U+003BF
+&pi;   U+003C0
+&rho;  U+003C1
+&sigmaf;       U+003C2
+&sigma;        U+003C3
+&tau;  U+003C4
+&upsilon;      U+003C5
+&phi;  U+003C6
+&chi;  U+003C7
+&psi;  U+003C8
+&omega;        U+003C9
+&thetasym;     U+003D1
+&upsih;        U+003D2
+&piv;  U+003D6
+&ensp; U+02002
+&emsp; U+02003
+&thinsp;       U+02009
+&zwnj; U+0200C
+&zwj;  U+0200D
+&lrm;  U+0200E
+&rlm;  U+0200F
+&ndash;        U+02013
+&mdash;        U+02014
+&lsquo;        U+02018
+&rsquo;        U+02019
+&sbquo;        U+0201A
+&ldquo;        U+0201C
+&rdquo;        U+0201D
+&bdquo;        U+0201E
+&dagger;       U+02020
+&Dagger;       U+02021
+&bull; U+02022
+&hellip;       U+02026
+&permil;       U+02030
+&prime;        U+02032
+&Prime;        U+02033
+&lsaquo;       U+02039
+&rsaquo;       U+0203A
+&oline;        U+0203E
+&frasl;        U+02044
+&euro; U+020AC
+&image;        U+02111
+&weierp;       U+02118
+&real; U+0211C
+&trade;        U+02122
+&alefsym;      U+02135
+&larr; U+02190
+&uarr; U+02191
+&rarr; U+02192
+&darr; U+02193
+&harr; U+02194
+&crarr;        U+021B5
+&lArr; U+021D0
+&uArr; U+021D1
+&rArr; U+021D2
+&dArr; U+021D3
+&hArr; U+021D4
+&forall;       U+02200
+&part; U+02202
+&exist;        U+02203
+&empty;        U+02205
+&nabla;        U+02207
+&isin; U+02208
+&notin;        U+02209
+&ni;   U+0220B
+&prod; U+0220F
+&sum;  U+02211
+&minus;        U+02212
+&lowast;       U+02217
+&radic;        U+0221A
+&prop; U+0221D
+&infin;        U+0221E
+&ang;  U+02220
+&and;  U+02227
+&or;   U+02228
+&cap;  U+02229
+&cup;  U+0222A
+&int;  U+0222B
+&there4;       U+02234
+&sim;  U+0223C
+&cong; U+02245
+&asymp;        U+02248
+&ne;   U+02260
+&equiv;        U+02261
+&le;   U+02264
+&ge;   U+02265
+&sub;  U+02282
+&sup;  U+02283
+&nsub; U+02284
+&sube; U+02286
+&supe; U+02287
+&oplus;        U+02295
+&otimes;       U+02297
+&perp; U+022A5
+&sdot; U+022C5
+&lceil;        U+02308
+&rceil;        U+02309
+&lfloor;       U+0230A
+&rfloor;       U+0230B
+&lang; U+02329
+&rang; U+0232A
+&loz;  U+025CA
+&spades;       U+02660
+&clubs;        U+02663
+&hearts;       U+02665
+&diams;        U+02666