36e1180b |
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 |
91e0dccc |
7 | * sq_get_html_translation_table() and sq_htmlentities(). They are |
36e1180b |
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 | * |
7566513b |
13 | * <pre> |
36e1180b |
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]]) |
7566513b |
16 | * </pre> |
36e1180b |
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 | * |
91e0dccc |
23 | * Why own functions are used instead of htmlspecialchars() and |
36e1180b |
24 | * htmlentities() provided by php. |
25 | * |
4f00b953 |
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 | * |
deb22cec |
32 | * <pre> |
36e1180b |
33 | * --- Full list of entities (w3.org html4.01 recommendations) |
34 | * 1. regural symbols |
35 | * U+0022 - " |
36 | * (replaced only when $style is not ENT_NOQUOTES or 0) |
37 | * U+0026 - & |
38 | * U+0027 - ' |
39 | * (replaced only when $style is ENT_QUOTES or 3) |
40 | * U+003C - < |
41 | * U+003E - > |
42 | * |
43 | * 2. latin1 symbols (HTMLlat1.ent) |
44 | * U+00A0 - -- no-break space = non-breaking space |
45 | * U+00A1 - ¡ -- inverted exclamation mark |
46 | * U+00A2 - ¢ -- cent sign |
47 | * U+00A3 - £ -- pound sign |
48 | * U+00A4 - ¤ -- currency sign |
49 | * U+00A5 - ¥ -- yen sign |
50 | * U+00A6 - ¦ -- broken bar |
51 | * U+00A7 - § -- section sign |
52 | * U+00A8 - ¨ -- diaeresis |
53 | * U+00A9 - © -- copyright sign |
54 | * U+00AA - ª -- feminine ordinal indicator |
55 | * U+00AB - « -- left-pointing double angle quotation mark = left pointing guillemet |
56 | * U+00AC - ¬ -- not sign |
57 | * U+00AD - ­ -- soft hyphen = discretionary hyphen |
58 | * U+00AE - ® -- registered sign = registered trade mark sign |
59 | * U+00AF - ¯ -- macron = spacing macron = overline = APL overbar |
60 | * U+00B0 - ° -- degree sign |
61 | * U+00B1 - ± -- plus-minus sign = plus-or-minus sign |
62 | * U+00B2 - ² -- superscript two = superscript digit two = squared |
63 | * U+00B3 - ³ -- superscript three = superscript digit three = cubed |
64 | * U+00B4 - ´ -- acute accent = spacing acute |
65 | * U+00B5 - µ -- micro sign |
66 | * U+00B6 - ¶ -- pilcrow sign = paragraph sign |
67 | * U+00B7 - · -- middle dot = Georgian comma = Greek middle dot |
68 | * U+00B8 - ¸ -- cedilla = spacing cedilla |
69 | * U+00B9 - ¹ -- superscript one = superscript digit one |
70 | * U+00BA - º -- masculine ordinal indicator |
71 | * U+00BB - » -- right-pointing double angle quotation mark = right pointing guillemet |
72 | * U+00BC - ¼ -- vulgar fraction one quarter = fraction one quarter |
73 | * U+00BD - ½ -- vulgar fraction one half = fraction one half |
74 | * U+00BE - ¾ -- vulgar fraction three quarters = fraction three quarters |
75 | * U+00BF - ¿ -- inverted question mark = turned question mark |
76 | * U+0180 - À -- latin capital letter A with grave = latin capital letter A grave, |
77 | * U+0181 - Á -- latin capital letter A with acute |
78 | * U+0182 - Â -- latin capital letter A with circumflex |
79 | * U+0183 - Ã -- latin capital letter A with tilde |
80 | * U+0184 - Ä -- latin capital letter A with diaeresis |
81 | * U+0185 - Å -- latin capital letter A with ring above = latin capital letter A ring |
82 | * U+0186 - Æ -- latin capital letter AE = latin capital ligature AE |
83 | * U+0187 - Ç -- latin capital letter C with cedilla |
84 | * U+0188 - È -- latin capital letter E with grave |
85 | * U+0189 - É -- latin capital letter E with acute |
86 | * U+018A - Ê -- latin capital letter E with circumflex |
87 | * U+018B - Ë -- latin capital letter E with diaeresis |
88 | * U+018C - Ì -- latin capital letter I with grave |
89 | * U+018D - Í -- latin capital letter I with acute |
90 | * U+018E - Î -- latin capital letter I with circumflex |
91 | * U+018F - Ï -- latin capital letter I with diaeresis |
92 | * U+0190 - Ð -- latin capital letter ETH |
93 | * U+0191 - Ñ -- latin capital letter N with tilde |
94 | * U+0192 - Ò -- latin capital letter O with grave |
95 | * U+0193 - Ó -- latin capital letter O with acute |
96 | * U+0194 - Ô -- latin capital letter O with circumflex |
97 | * U+0195 - Õ -- latin capital letter O with tilde |
98 | * U+0196 - Ö -- latin capital letter O with diaeresis |
99 | * U+0197 - × -- multiplication sign |
100 | * U+0198 - Ø -- latin capital letter O with stroke = latin capital letter O slash |
101 | * U+0199 - Ù -- latin capital letter U with grave |
102 | * U+019A - Ú -- latin capital letter U with acute |
103 | * U+019B - Û -- latin capital letter U with circumflex |
104 | * U+019C - Ü -- latin capital letter U with diaeresis |
105 | * U+019D - Ý -- latin capital letter Y with acute |
106 | * U+019E - Þ -- latin capital letter THORN |
107 | * U+019F - ß -- latin small letter sharp s = ess-zed |
108 | * U+01A0 - à -- latin small letter a with grave = latin small letter a grave |
109 | * U+01A1 - á -- latin small letter a with acute |
110 | * U+01A2 - â -- latin small letter a with circumflex |
111 | * U+01A3 - ã -- latin small letter a with tilde |
112 | * U+01A4 - ä -- latin small letter a with diaeresis |
113 | * U+01A5 - å -- latin small letter a with ring above = latin small letter a ring |
114 | * U+01A6 - æ -- latin small letter ae = latin small ligature ae |
115 | * U+01A7 - ç -- latin small letter c with cedilla |
116 | * U+01A8 - è -- latin small letter e with grave |
117 | * U+01A9 - é -- latin small letter e with acute |
118 | * U+01AA - ê -- latin small letter e with circumflex |
119 | * U+01AB - ë -- latin small letter e with diaeresis |
120 | * U+01AC - ì -- latin small letter i with grave |
121 | * U+01AD - í -- latin small letter i with acute |
122 | * U+01AE - î -- latin small letter i with circumflex |
123 | * U+01AF - ï -- latin small letter i with diaeresis |
124 | * U+01B0 - ð -- latin small letter eth |
125 | * U+01B1 - ñ -- latin small letter n with tilde |
126 | * U+01B2 - ò -- latin small letter o with grave |
127 | * U+01B3 - ó -- latin small letter o with acute |
128 | * U+01B4 - ô -- latin small letter o with circumflex |
129 | * U+01B5 - õ -- latin small letter o with tilde |
130 | * U+01B6 - ö -- latin small letter o with diaeresis |
131 | * U+01B7 - ÷ -- division sign |
132 | * U+01B8 - ø -- latin small letter o with stroke = latin small letter o slash, |
133 | * U+01B9 - ù -- latin small letter u with grave |
134 | * U+01BA - ú -- latin small letter u with acute |
135 | * U+01BB - û -- latin small letter u with circumflex |
136 | * U+01BC - ü -- latin small letter u with diaeresis |
137 | * U+01BD - ý -- latin small letter y with acute |
138 | * U+01BE - þ -- latin small letter thorn, |
139 | * U+01BF - ÿ -- latin small letter y with diaeresis |
140 | * |
141 | * 3. Special symbols (HTMLspecial.ent) |
142 | * Latin Extended-A |
143 | * U+0152 - Œ -- |
144 | * U+0153 - œ -- latin small ligature oe |
145 | * U+0160 - Š -- latin capital letter S with caron |
146 | * U+0161 - š -- latin small letter s with caron |
147 | * U+0178 - Ÿ -- latin capital letter Y with diaeresis |
148 | * Spacing Modifier Letters |
149 | * U+02C6 - ˆ -- modifier letter circumflex accent |
150 | * U+02DC - ˜ -- small tilde |
151 | * General Punctuation |
152 | * U+2002 -   -- en space |
153 | * U+2003 -   -- em space |
154 | * U+2009 -   -- thin space |
155 | * U+200C - ‌ -- zero width non-joiner |
156 | * U+200D - ‍ -- zero width joiner |
157 | * U+200E - ‎ -- left-to-right mark |
158 | * U+200F - ‏ -- right-to-left mark |
159 | * U+2013 - – -- en dash |
160 | * U+2014 - — -- em dash |
161 | * U+2018 - ‘ -- left single quotation mark |
162 | * U+2019 - ’ -- right single quotation mark |
163 | * U+201A - ‚ -- single low-9 quotation mark |
164 | * U+201C - “ -- left double quotation mark |
165 | * U+201D - ” -- right double quotation mark |
166 | * U+201E - „ -- double low-9 quotation mark |
167 | * U+2020 - † -- dagger |
168 | * U+2021 - ‡ -- double dagger |
169 | * U+2030 - ‰ -- per mille sign |
170 | * U+2039 - ‹ -- single left-pointing angle quotation mark |
171 | * U+203A - › -- single right-pointing angle quotation mark |
172 | * U+20AC - € -- euro sign |
173 | * |
174 | * 4. Other symbols (HTMLsymbol.ent) |
175 | * Latin Extended-B |
176 | * U+0192 - ƒ -- latin small f with hook = function = florin |
177 | * Greek |
178 | * U+0391 - Α -- greek capital letter alpha |
179 | * U+0392 - Β -- greek capital letter beta |
180 | * U+0393 - Γ -- greek capital letter gamma |
181 | * U+0394 - Δ -- greek capital letter delta |
182 | * U+0395 - Ε -- greek capital letter epsilon |
183 | * U+0396 - Ζ -- greek capital letter zeta |
184 | * U+0397 - Η -- greek capital letter eta |
185 | * U+0398 - Θ -- greek capital letter theta |
186 | * U+0399 - Ι -- greek capital letter iota |
187 | * U+039A - Κ -- greek capital letter kappa |
188 | * U+039B - Λ -- greek capital letter lambda |
189 | * U+039C - Μ -- greek capital letter mu |
190 | * U+039D - Ν -- greek capital letter nu |
191 | * U+039E - Ξ -- greek capital letter xi |
192 | * U+039F - Ο -- greek capital letter omicron |
193 | * U+03A0 - Π -- greek capital letter pi |
194 | * U+03A1 - Ρ -- greek capital letter rho |
195 | * U+03A3 - Σ -- greek capital letter sigma |
196 | * U+03A4 - Τ -- greek capital letter tau |
197 | * U+03A5 - Υ -- greek capital letter upsilon |
198 | * U+03A6 - Φ -- greek capital letter phi |
199 | * U+03A7 - Χ -- greek capital letter chi |
200 | * U+03A8 - Ψ -- greek capital letter psi |
201 | * U+03A9 - Ω -- greek capital letter omega |
202 | * U+03B1 - α -- greek small letter alpha |
203 | * U+03B2 - β -- greek small letter beta |
204 | * U+03B3 - γ -- greek small letter gamma |
205 | * U+03B4 - δ -- greek small letter delta |
206 | * U+03B5 - ε -- greek small letter epsilon |
207 | * U+03B6 - ζ -- greek small letter zeta |
208 | * U+03B7 - η -- greek small letter eta |
209 | * U+03B8 - θ -- greek small letter theta |
210 | * U+03B9 - ι -- greek small letter iota |
211 | * U+03BA - κ -- greek small letter kappa |
212 | * U+03BB - λ -- greek small letter lambda |
213 | * U+03BC - μ -- greek small letter mu |
214 | * U+03BD - ν -- greek small letter nu |
215 | * U+03BE - ξ -- greek small letter xi |
216 | * U+03BF - ο -- greek small letter omicron |
217 | * U+03C0 - π -- greek small letter pi |
218 | * U+03C1 - ρ -- greek small letter rho |
219 | * U+03C2 - ς -- greek small letter final sigma |
220 | * U+03C3 - σ -- greek small letter sigma |
221 | * U+03C4 - τ -- greek small letter tau |
222 | * U+03C5 - υ -- greek small letter upsilon |
223 | * U+03C6 - φ -- greek small letter phi |
224 | * U+03C7 - χ -- greek small letter chi |
225 | * U+03C8 - ψ -- greek small letter psi |
226 | * U+03C9 - ω -- greek small letter omega |
227 | * U+03D1 - ϑ -- greek small letter theta symbol |
228 | * U+03D2 - ϒ -- greek upsilon with hook symbol |
229 | * U+03D6 - ϖ -- greek pi symbol |
230 | * |
231 | * General Punctuation |
232 | * U+2022 - • -- bullet = black small circle |
233 | * U+2026 - … -- horizontal ellipsis = three dot leader |
234 | * U+2032 - ′ -- prime = minutes = feet |
235 | * U+2033 - ″ -- double prime = seconds = inches |
236 | * U+203E - ‾ -- overline = spacing overscore |
237 | * U+2044 - ⁄ -- fraction slash |
238 | * |
239 | * Letterlike Symbols |
240 | * U+2118 - ℘ -- script capital P = power set = Weierstrass p |
241 | * U+2111 - ℑ -- blackletter capital I = imaginary part |
242 | * U+211C - ℜ -- blackletter capital R = real part symbol |
243 | * U+2122 - ™ -- trade mark sign |
244 | * U+2135 - ℵ -- alef symbol = first transfinite cardinal |
245 | * |
246 | * Arrows |
247 | * U+2190 - ← -- leftwards arrow |
248 | * U+2191 - ↑ -- upwards arrow |
249 | * U+2192 - → -- rightwards arrow |
250 | * U+2193 - ↓ -- downwards arrow |
251 | * U+2194 - ↔ -- left right arrow |
252 | * U+21B5 - ↵ -- downwards arrow with corner leftwards = carriage return |
253 | * U+21D0 - ⇐ -- leftwards double arrow |
254 | * U+21D1 - ⇑ -- upwards double arrow |
255 | * U+21D2 - ⇒ -- rightwards double arrow |
256 | * U+21D3 - ⇓ -- downwards double arrow |
257 | * U+21D4 - ⇔ -- left right double arrow |
258 | * |
259 | * Mathematical Operators |
260 | * U+2200 - ∀ -- for all |
261 | * U+2202 - ∂ -- partial differential |
262 | * U+2203 - ∃ -- there exists |
263 | * U+2205 - ∅ -- empty set = null set = diameter |
264 | * U+2207 - ∇ -- nabla = backward difference |
265 | * U+2208 - ∈ -- element of |
266 | * U+2209 - ∉ -- not an element of |
267 | * U+220B - ∋ -- contains as member |
268 | * U+220F - ∏ -- n-ary product = product sign |
269 | * U+2211 - ∑ -- n-ary sumation |
270 | * U+2212 - − -- minus sign |
271 | * U+2217 - ∗ -- asterisk operator |
272 | * U+221A - √ -- square root = radical sign |
273 | * U+221D - ∝ -- proportional to |
274 | * U+221E - ∞ -- infinity |
275 | * U+2220 - ∠ -- angle |
276 | * U+2227 - ∧ -- logical and = wedge |
277 | * U+2228 - ∨ -- logical or = vee |
278 | * U+2229 - ∩ -- intersection = cap |
279 | * U+222A - ∪ -- union = cup |
280 | * U+222B - ∫ -- integral |
281 | * U+2234 - ∴ -- therefore |
282 | * U+223C - ∼ -- tilde operator = varies with = similar to |
283 | * U+2245 - ≅ -- approximately equal to |
284 | * U+2248 - ≈ -- almost equal to = asymptotic to |
285 | * U+2260 - ≠ -- not equal to |
286 | * U+2261 - ≡ -- identical to |
287 | * U+2264 - ≤ -- less-than or equal to |
288 | * U+2265 - ≥ -- greater-than or equal to |
289 | * U+2282 - ⊂ -- subset of |
290 | * U+2283 - ⊃ -- superset of |
291 | * U+2284 - ⊄ -- not a subset of |
292 | * U+2286 - ⊆ -- subset of or equal to |
293 | * U+2287 - ⊇ -- superset of or equal to |
294 | * U+2295 - ⊕ -- circled plus = direct sum |
295 | * U+2297 - ⊗ -- circled times = vector product |
296 | * U+22A5 - ⊥ -- up tack = orthogonal to = perpendicular |
297 | * U+22C5 - ⋅ -- dot operator |
298 | * |
299 | * Miscellaneous Technical |
300 | * U+2308 - ⌈ -- left ceiling = apl upstile |
301 | * U+2309 - ⌉ -- right ceiling |
302 | * U+230A - ⌊ -- left floor = apl downstile |
303 | * U+230B - ⌋ -- right floor |
304 | * U+2329 - ⟨ -- left-pointing angle bracket = bra |
305 | * U+232A - ⟩ -- right-pointing angle bracket = ket |
306 | * |
307 | * Geometric Shapes |
308 | * U+25CA - ◊ -- lozenge |
309 | * |
310 | * Miscellaneous Symbols |
311 | * U+2660 - ♠ -- black spade suit |
312 | * U+2663 - ♣ -- black club suit = shamrock |
313 | * U+2665 - ♥ -- black heart suit = valentine |
314 | * U+2666 - ♦ -- black diamond suit |
deb22cec |
315 | * </pre> |
36e1180b |
316 | * |
317 | * @copyright (c) 2004 The SquirrelMail development team |
318 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
319 | * @version $Id$ |
320 | * @package squirrelmail |
321 | * @subpackage strings |
322 | */ |
323 | ?> |