readme.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. <?php
  2. /**
  3. * SquirrelMail html translation table documentation
  4. *
  5. * SquirrelMail provides own implementation of htmlentities() and
  6. * get_html_translation_table() functions. Functions are called
  7. * sq_get_html_translation_table() and sq_htmlentities(). They are
  8. * included in functions/strings.php
  9. *
  10. * sq_htmlentities uses same syntax as functions available in php 4.1.0
  11. * sq_get_html_translation_table adds third option that sets charset.
  12. *
  13. * <pre>
  14. * string sq_htmlentities ( string string [, int quote_style [, string charset]])
  15. * array sq_get_html_translation_table ( int table [, int quote_style [, string charset]])
  16. * </pre>
  17. *
  18. * If sq_get_html_translation_table function is called with HTML_SPECIALCHARS option,
  19. * it returns us-ascii translation table. If it is called with HTML_ENTITIES option,
  20. * it returns translation table defined by charset. Function defaults to us-ascii charset
  21. * and not to iso-8859-1.
  22. *
  23. * Why own functions are used instead of htmlspecialchars() and
  24. * htmlentities() provided by php.
  25. *
  26. * <ul>
  27. * <li>a) removes dependency on options available only in php v.4.1+</li>
  28. * <li>b) default behavior of htmlentities() is disastrous in non iso-8859-1 environment.</li>
  29. * <li>c) provides better control of transformations.</li>
  30. * </ul>
  31. *
  32. * <pre>
  33. * --- Full list of entities (w3.org html4.01 recommendations)
  34. * 1. regural symbols
  35. * U+0022 - &quot;
  36. * (replaced only when $style is not ENT_NOQUOTES or 0)
  37. * U+0026 - &amp;
  38. * U+0027 - &#39;
  39. * (replaced only when $style is ENT_QUOTES or 3)
  40. * U+003C - &lt;
  41. * U+003E - &gt;
  42. *
  43. * 2. latin1 symbols (HTMLlat1.ent)
  44. * U+00A0 - &nbsp; -- no-break space = non-breaking space
  45. * U+00A1 - &iexcl; -- inverted exclamation mark
  46. * U+00A2 - &cent; -- cent sign
  47. * U+00A3 - &pound; -- pound sign
  48. * U+00A4 - &curren; -- currency sign
  49. * U+00A5 - &yen; -- yen sign
  50. * U+00A6 - &brvbar; -- broken bar
  51. * U+00A7 - &sect; -- section sign
  52. * U+00A8 - &uml; -- diaeresis
  53. * U+00A9 - &copy; -- copyright sign
  54. * U+00AA - &ordf; -- feminine ordinal indicator
  55. * U+00AB - &laquo; -- left-pointing double angle quotation mark = left pointing guillemet
  56. * U+00AC - &not; -- not sign
  57. * U+00AD - &shy; -- soft hyphen = discretionary hyphen
  58. * U+00AE - &reg; -- registered sign = registered trade mark sign
  59. * U+00AF - &macr; -- macron = spacing macron = overline = APL overbar
  60. * U+00B0 - &deg; -- degree sign
  61. * U+00B1 - &plusmn; -- plus-minus sign = plus-or-minus sign
  62. * U+00B2 - &sup2; -- superscript two = superscript digit two = squared
  63. * U+00B3 - &sup3; -- superscript three = superscript digit three = cubed
  64. * U+00B4 - &acute; -- acute accent = spacing acute
  65. * U+00B5 - &micro; -- micro sign
  66. * U+00B6 - &para; -- pilcrow sign = paragraph sign
  67. * U+00B7 - &middot; -- middle dot = Georgian comma = Greek middle dot
  68. * U+00B8 - &cedil; -- cedilla = spacing cedilla
  69. * U+00B9 - &sup1; -- superscript one = superscript digit one
  70. * U+00BA - &ordm; -- masculine ordinal indicator
  71. * U+00BB - &raquo; -- right-pointing double angle quotation mark = right pointing guillemet
  72. * U+00BC - &frac14; -- vulgar fraction one quarter = fraction one quarter
  73. * U+00BD - &frac12; -- vulgar fraction one half = fraction one half
  74. * U+00BE - &frac34; -- vulgar fraction three quarters = fraction three quarters
  75. * U+00BF - &iquest; -- inverted question mark = turned question mark
  76. * U+0180 - &Agrave; -- latin capital letter A with grave = latin capital letter A grave,
  77. * U+0181 - &Aacute; -- latin capital letter A with acute
  78. * U+0182 - &Acirc; -- latin capital letter A with circumflex
  79. * U+0183 - &Atilde; -- latin capital letter A with tilde
  80. * U+0184 - &Auml; -- latin capital letter A with diaeresis
  81. * U+0185 - &Aring; -- latin capital letter A with ring above = latin capital letter A ring
  82. * U+0186 - &AElig; -- latin capital letter AE = latin capital ligature AE
  83. * U+0187 - &Ccedil; -- latin capital letter C with cedilla
  84. * U+0188 - &Egrave; -- latin capital letter E with grave
  85. * U+0189 - &Eacute; -- latin capital letter E with acute
  86. * U+018A - &Ecirc; -- latin capital letter E with circumflex
  87. * U+018B - &Euml; -- latin capital letter E with diaeresis
  88. * U+018C - &Igrave; -- latin capital letter I with grave
  89. * U+018D - &Iacute; -- latin capital letter I with acute
  90. * U+018E - &Icirc; -- latin capital letter I with circumflex
  91. * U+018F - &Iuml; -- latin capital letter I with diaeresis
  92. * U+0190 - &ETH; -- latin capital letter ETH
  93. * U+0191 - &Ntilde; -- latin capital letter N with tilde
  94. * U+0192 - &Ograve; -- latin capital letter O with grave
  95. * U+0193 - &Oacute; -- latin capital letter O with acute
  96. * U+0194 - &Ocirc; -- latin capital letter O with circumflex
  97. * U+0195 - &Otilde; -- latin capital letter O with tilde
  98. * U+0196 - &Ouml; -- latin capital letter O with diaeresis
  99. * U+0197 - &times; -- multiplication sign
  100. * U+0198 - &Oslash; -- latin capital letter O with stroke = latin capital letter O slash
  101. * U+0199 - &Ugrave; -- latin capital letter U with grave
  102. * U+019A - &Uacute; -- latin capital letter U with acute
  103. * U+019B - &Ucirc; -- latin capital letter U with circumflex
  104. * U+019C - &Uuml; -- latin capital letter U with diaeresis
  105. * U+019D - &Yacute; -- latin capital letter Y with acute
  106. * U+019E - &THORN; -- latin capital letter THORN
  107. * U+019F - &szlig; -- latin small letter sharp s = ess-zed
  108. * U+01A0 - &agrave; -- latin small letter a with grave = latin small letter a grave
  109. * U+01A1 - &aacute; -- latin small letter a with acute
  110. * U+01A2 - &acirc; -- latin small letter a with circumflex
  111. * U+01A3 - &atilde; -- latin small letter a with tilde
  112. * U+01A4 - &auml; -- latin small letter a with diaeresis
  113. * U+01A5 - &aring; -- latin small letter a with ring above = latin small letter a ring
  114. * U+01A6 - &aelig; -- latin small letter ae = latin small ligature ae
  115. * U+01A7 - &ccedil; -- latin small letter c with cedilla
  116. * U+01A8 - &egrave; -- latin small letter e with grave
  117. * U+01A9 - &eacute; -- latin small letter e with acute
  118. * U+01AA - &ecirc; -- latin small letter e with circumflex
  119. * U+01AB - &euml; -- latin small letter e with diaeresis
  120. * U+01AC - &igrave; -- latin small letter i with grave
  121. * U+01AD - &iacute; -- latin small letter i with acute
  122. * U+01AE - &icirc; -- latin small letter i with circumflex
  123. * U+01AF - &iuml; -- latin small letter i with diaeresis
  124. * U+01B0 - &eth; -- latin small letter eth
  125. * U+01B1 - &ntilde; -- latin small letter n with tilde
  126. * U+01B2 - &ograve; -- latin small letter o with grave
  127. * U+01B3 - &oacute; -- latin small letter o with acute
  128. * U+01B4 - &ocirc; -- latin small letter o with circumflex
  129. * U+01B5 - &otilde; -- latin small letter o with tilde
  130. * U+01B6 - &ouml; -- latin small letter o with diaeresis
  131. * U+01B7 - &divide; -- division sign
  132. * U+01B8 - &oslash; -- latin small letter o with stroke = latin small letter o slash,
  133. * U+01B9 - &ugrave; -- latin small letter u with grave
  134. * U+01BA - &uacute; -- latin small letter u with acute
  135. * U+01BB - &ucirc; -- latin small letter u with circumflex
  136. * U+01BC - &uuml; -- latin small letter u with diaeresis
  137. * U+01BD - &yacute; -- latin small letter y with acute
  138. * U+01BE - &thorn; -- latin small letter thorn,
  139. * U+01BF - &yuml; -- latin small letter y with diaeresis
  140. *
  141. * 3. Special symbols (HTMLspecial.ent)
  142. * Latin Extended-A
  143. * U+0152 - &OElig; --
  144. * U+0153 - &oelig; -- latin small ligature oe
  145. * U+0160 - &Scaron; -- latin capital letter S with caron
  146. * U+0161 - &scaron; -- latin small letter s with caron
  147. * U+0178 - &Yuml; -- latin capital letter Y with diaeresis
  148. * Spacing Modifier Letters
  149. * U+02C6 - &circ; -- modifier letter circumflex accent
  150. * U+02DC - &tilde; -- small tilde
  151. * General Punctuation
  152. * U+2002 - &ensp; -- en space
  153. * U+2003 - &emsp; -- em space
  154. * U+2009 - &thinsp; -- thin space
  155. * U+200C - &zwnj; -- zero width non-joiner
  156. * U+200D - &zwj; -- zero width joiner
  157. * U+200E - &lrm; -- left-to-right mark
  158. * U+200F - &rlm; -- right-to-left mark
  159. * U+2013 - &ndash; -- en dash
  160. * U+2014 - &mdash; -- em dash
  161. * U+2018 - &lsquo; -- left single quotation mark
  162. * U+2019 - &rsquo; -- right single quotation mark
  163. * U+201A - &sbquo; -- single low-9 quotation mark
  164. * U+201C - &ldquo; -- left double quotation mark
  165. * U+201D - &rdquo; -- right double quotation mark
  166. * U+201E - &bdquo; -- double low-9 quotation mark
  167. * U+2020 - &dagger; -- dagger
  168. * U+2021 - &Dagger; -- double dagger
  169. * U+2030 - &permil; -- per mille sign
  170. * U+2039 - &lsaquo; -- single left-pointing angle quotation mark
  171. * U+203A - &rsaquo; -- single right-pointing angle quotation mark
  172. * U+20AC - &euro; -- euro sign
  173. *
  174. * 4. Other symbols (HTMLsymbol.ent)
  175. * Latin Extended-B
  176. * U+0192 - &fnof; -- latin small f with hook = function = florin
  177. * Greek
  178. * U+0391 - &Alpha; -- greek capital letter alpha
  179. * U+0392 - &Beta; -- greek capital letter beta
  180. * U+0393 - &Gamma; -- greek capital letter gamma
  181. * U+0394 - &Delta; -- greek capital letter delta
  182. * U+0395 - &Epsilon; -- greek capital letter epsilon
  183. * U+0396 - &Zeta; -- greek capital letter zeta
  184. * U+0397 - &Eta; -- greek capital letter eta
  185. * U+0398 - &Theta; -- greek capital letter theta
  186. * U+0399 - &Iota; -- greek capital letter iota
  187. * U+039A - &Kappa; -- greek capital letter kappa
  188. * U+039B - &Lambda; -- greek capital letter lambda
  189. * U+039C - &Mu; -- greek capital letter mu
  190. * U+039D - &Nu; -- greek capital letter nu
  191. * U+039E - &Xi; -- greek capital letter xi
  192. * U+039F - &Omicron; -- greek capital letter omicron
  193. * U+03A0 - &Pi; -- greek capital letter pi
  194. * U+03A1 - &Rho; -- greek capital letter rho
  195. * U+03A3 - &Sigma; -- greek capital letter sigma
  196. * U+03A4 - &Tau; -- greek capital letter tau
  197. * U+03A5 - &Upsilon; -- greek capital letter upsilon
  198. * U+03A6 - &Phi; -- greek capital letter phi
  199. * U+03A7 - &Chi; -- greek capital letter chi
  200. * U+03A8 - &Psi; -- greek capital letter psi
  201. * U+03A9 - &Omega; -- greek capital letter omega
  202. * U+03B1 - &alpha; -- greek small letter alpha
  203. * U+03B2 - &beta; -- greek small letter beta
  204. * U+03B3 - &gamma; -- greek small letter gamma
  205. * U+03B4 - &delta; -- greek small letter delta
  206. * U+03B5 - &epsilon; -- greek small letter epsilon
  207. * U+03B6 - &zeta; -- greek small letter zeta
  208. * U+03B7 - &eta; -- greek small letter eta
  209. * U+03B8 - &theta; -- greek small letter theta
  210. * U+03B9 - &iota; -- greek small letter iota
  211. * U+03BA - &kappa; -- greek small letter kappa
  212. * U+03BB - &lambda; -- greek small letter lambda
  213. * U+03BC - &mu; -- greek small letter mu
  214. * U+03BD - &nu; -- greek small letter nu
  215. * U+03BE - &xi; -- greek small letter xi
  216. * U+03BF - &omicron; -- greek small letter omicron
  217. * U+03C0 - &pi; -- greek small letter pi
  218. * U+03C1 - &rho; -- greek small letter rho
  219. * U+03C2 - &sigmaf; -- greek small letter final sigma
  220. * U+03C3 - &sigma; -- greek small letter sigma
  221. * U+03C4 - &tau; -- greek small letter tau
  222. * U+03C5 - &upsilon; -- greek small letter upsilon
  223. * U+03C6 - &phi; -- greek small letter phi
  224. * U+03C7 - &chi; -- greek small letter chi
  225. * U+03C8 - &psi; -- greek small letter psi
  226. * U+03C9 - &omega; -- greek small letter omega
  227. * U+03D1 - &thetasym; -- greek small letter theta symbol
  228. * U+03D2 - &upsih; -- greek upsilon with hook symbol
  229. * U+03D6 - &piv; -- greek pi symbol
  230. *
  231. * General Punctuation
  232. * U+2022 - &bull; -- bullet = black small circle
  233. * U+2026 - &hellip; -- horizontal ellipsis = three dot leader
  234. * U+2032 - &prime; -- prime = minutes = feet
  235. * U+2033 - &Prime; -- double prime = seconds = inches
  236. * U+203E - &oline; -- overline = spacing overscore
  237. * U+2044 - &frasl; -- fraction slash
  238. *
  239. * Letterlike Symbols
  240. * U+2118 - &weierp; -- script capital P = power set = Weierstrass p
  241. * U+2111 - &image; -- blackletter capital I = imaginary part
  242. * U+211C - &real; -- blackletter capital R = real part symbol
  243. * U+2122 - &trade; -- trade mark sign
  244. * U+2135 - &alefsym; -- alef symbol = first transfinite cardinal
  245. *
  246. * Arrows
  247. * U+2190 - &larr; -- leftwards arrow
  248. * U+2191 - &uarr; -- upwards arrow
  249. * U+2192 - &rarr; -- rightwards arrow
  250. * U+2193 - &darr; -- downwards arrow
  251. * U+2194 - &harr; -- left right arrow
  252. * U+21B5 - &crarr; -- downwards arrow with corner leftwards = carriage return
  253. * U+21D0 - &lArr; -- leftwards double arrow
  254. * U+21D1 - &uArr; -- upwards double arrow
  255. * U+21D2 - &rArr; -- rightwards double arrow
  256. * U+21D3 - &dArr; -- downwards double arrow
  257. * U+21D4 - &hArr; -- left right double arrow
  258. *
  259. * Mathematical Operators
  260. * U+2200 - &forall; -- for all
  261. * U+2202 - &part; -- partial differential
  262. * U+2203 - &exist; -- there exists
  263. * U+2205 - &empty; -- empty set = null set = diameter
  264. * U+2207 - &nabla; -- nabla = backward difference
  265. * U+2208 - &isin; -- element of
  266. * U+2209 - &notin; -- not an element of
  267. * U+220B - &ni; -- contains as member
  268. * U+220F - &prod; -- n-ary product = product sign
  269. * U+2211 - &sum; -- n-ary sumation
  270. * U+2212 - &minus; -- minus sign
  271. * U+2217 - &lowast; -- asterisk operator
  272. * U+221A - &radic; -- square root = radical sign
  273. * U+221D - &prop; -- proportional to
  274. * U+221E - &infin; -- infinity
  275. * U+2220 - &ang; -- angle
  276. * U+2227 - &and; -- logical and = wedge
  277. * U+2228 - &or; -- logical or = vee
  278. * U+2229 - &cap; -- intersection = cap
  279. * U+222A - &cup; -- union = cup
  280. * U+222B - &int; -- integral
  281. * U+2234 - &there4; -- therefore
  282. * U+223C - &sim; -- tilde operator = varies with = similar to
  283. * U+2245 - &cong; -- approximately equal to
  284. * U+2248 - &asymp; -- almost equal to = asymptotic to
  285. * U+2260 - &ne; -- not equal to
  286. * U+2261 - &equiv; -- identical to
  287. * U+2264 - &le; -- less-than or equal to
  288. * U+2265 - &ge; -- greater-than or equal to
  289. * U+2282 - &sub; -- subset of
  290. * U+2283 - &sup; -- superset of
  291. * U+2284 - &nsub; -- not a subset of
  292. * U+2286 - &sube; -- subset of or equal to
  293. * U+2287 - &supe; -- superset of or equal to
  294. * U+2295 - &oplus; -- circled plus = direct sum
  295. * U+2297 - &otimes; -- circled times = vector product
  296. * U+22A5 - &perp; -- up tack = orthogonal to = perpendicular
  297. * U+22C5 - &sdot; -- dot operator
  298. *
  299. * Miscellaneous Technical
  300. * U+2308 - &lceil; -- left ceiling = apl upstile
  301. * U+2309 - &rceil; -- right ceiling
  302. * U+230A - &lfloor; -- left floor = apl downstile
  303. * U+230B - &rfloor; -- right floor
  304. * U+2329 - &lang; -- left-pointing angle bracket = bra
  305. * U+232A - &rang; -- right-pointing angle bracket = ket
  306. *
  307. * Geometric Shapes
  308. * U+25CA - &loz; -- lozenge
  309. *
  310. * Miscellaneous Symbols
  311. * U+2660 - &spades; -- black spade suit
  312. * U+2663 - &clubs; -- black club suit = shamrock
  313. * U+2665 - &hearts; -- black heart suit = valentine
  314. * U+2666 - &diams; -- black diamond suit
  315. * </pre>
  316. *
  317. * @copyright 2004-2025 The SquirrelMail Project Team
  318. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  319. * @version $Id$
  320. * @package squirrelmail
  321. * @subpackage strings
  322. */