KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > xml > io > HTMLEntities


1 /*
2  * Enhydra Java Application Server Project
3  *
4  * The contents of this file are subject to the Enhydra Public License
5  * Version 1.1 (the "License"); you may not use this file except in
6  * compliance with the License. You may obtain a copy of the License on
7  * the Enhydra web site ( http://www.enhydra.org/ ).
8  *
9  * Software distributed under the License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11  * the License for the specific terms governing rights and limitations
12  * under the License.
13  *
14  * The Initial Developer of the Enhydra Application Server is Lutris
15  * Technologies, Inc. The Enhydra Application Server and portions created
16  * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
17  * All Rights Reserved.
18  *
19  * Contributor(s):
20  *
21  * $Id: HTMLEntities.java,v 1.1.1.1 2003/03/10 16:36:17 taweili Exp $
22  */

23
24 // FIXME: convert this to an interface and then have implementing classes
25
// for HTML3.2 and 4.0
26

27 package org.enhydra.xml.io;
28
29 /**
30  * Definitions of HTML character entities and conversions
31  * between unicode characters and HTML character entities.
32  */

33 public class HTMLEntities {
34     /**
35      * Unicode character for entity <tt>quot</tt> (").
36      */

37     public static final char quot = '\u0022';
38
39     /**
40      * Unicode character for entity <tt>amp</tt> (&).
41      */

42     public static final char amp = '\u0026';
43
44     /**
45      * Unicode character for entity <tt>lt</tt> (<).
46      */

47     public static final char lt = '\u003c';
48
49     /**
50      * Unicode character for entity <tt>gt</tt> (>).
51      */

52     public static final char gt = '\u003e';
53
54     /**
55      * Unicode character for entity <tt>nbsp</tt> ( ).
56      */

57     public static final char nbsp = '\u00a0';
58
59     /**
60      * Unicode character for entity <tt>iexcl</tt> (¡).
61      */

62     public static final char iexcl = '\u00a1';
63
64     /**
65      * Unicode character for entity <tt>cent</tt> (¢).
66      */

67     public static final char cent = '\u00a2';
68
69     /**
70      * Unicode character for entity <tt>pound</tt> (£).
71      */

72     public static final char pound = '\u00a3';
73
74     /**
75      * Unicode character for entity <tt>curren</tt> (¤).
76      */

77     public static final char curren = '\u00a4';
78
79     /**
80      * Unicode character for entity <tt>yen</tt> (¥).
81      */

82     public static final char yen = '\u00a5';
83
84     /**
85      * Unicode character for entity <tt>brvbar</tt> (¦).
86      */

87     public static final char brvbar = '\u00a6';
88
89     /**
90      * Unicode character for entity <tt>sect</tt> (§).
91      */

92     public static final char sect = '\u00a7';
93
94     /**
95      * Unicode character for entity <tt>uml</tt> (¨).
96      */

97     public static final char uml = '\u00a8';
98
99     /**
100      * Unicode character for entity <tt>copy</tt> (©).
101      */

102     public static final char copy = '\u00a9';
103
104     /**
105      * Unicode character for entity <tt>ordf</tt> (ª).
106      */

107     public static final char ordf = '\u00aa';
108
109     /**
110      * Unicode character for entity <tt>laquo</tt> («).
111      */

112     public static final char laquo = '\u00ab';
113
114     /**
115      * Unicode character for entity <tt>not</tt> (¬).
116      */

117     public static final char not = '\u00ac';
118
119     /**
120      * Unicode character for entity <tt>shy</tt> (­).
121      */

122     public static final char shy = '\u00ad';
123
124     /**
125      * Unicode character for entity <tt>reg</tt> (®).
126      */

127     public static final char reg = '\u00ae';
128
129     /**
130      * Unicode character for entity <tt>macr</tt> (¯).
131      */

132     public static final char macr = '\u00af';
133
134     /**
135      * Unicode character for entity <tt>deg</tt> (°).
136      */

137     public static final char deg = '\u00b0';
138
139     /**
140      * Unicode character for entity <tt>plusmn</tt> (±).
141      */

142     public static final char plusmn = '\u00b1';
143
144     /**
145      * Unicode character for entity <tt>sup2</tt> (²).
146      */

147     public static final char sup2 = '\u00b2';
148
149     /**
150      * Unicode character for entity <tt>sup3</tt> (³).
151      */

152     public static final char sup3 = '\u00b3';
153
154     /**
155      * Unicode character for entity <tt>acute</tt> (´).
156      */

157     public static final char acute = '\u00b4';
158
159     /**
160      * Unicode character for entity <tt>micro</tt> (µ).
161      */

162     public static final char micro = '\u00b5';
163
164     /**
165      * Unicode character for entity <tt>para</tt> (¶).
166      */

167     public static final char para = '\u00b6';
168
169     /**
170      * Unicode character for entity <tt>middot</tt> (·).
171      */

172     public static final char middot = '\u00b7';
173
174     /**
175      * Unicode character for entity <tt>cedil</tt> (¸).
176      */

177     public static final char cedil = '\u00b8';
178
179     /**
180      * Unicode character for entity <tt>sup1</tt> (¹).
181      */

182     public static final char sup1 = '\u00b9';
183
184     /**
185      * Unicode character for entity <tt>ordm</tt> (º).
186      */

187     public static final char ordm = '\u00ba';
188
189     /**
190      * Unicode character for entity <tt>raquo</tt> (»).
191      */

192     public static final char raquo = '\u00bb';
193
194     /**
195      * Unicode character for entity <tt>frac14</tt> (¼).
196      */

197     public static final char frac14 = '\u00bc';
198
199     /**
200      * Unicode character for entity <tt>frac12</tt> (½).
201      */

202     public static final char frac12 = '\u00bd';
203
204     /**
205      * Unicode character for entity <tt>frac34</tt> (¾).
206      */

207     public static final char frac34 = '\u00be';
208
209     /**
210      * Unicode character for entity <tt>iquest</tt> (¿).
211      */

212     public static final char iquest = '\u00bf';
213
214     /**
215      * Unicode character for entity <tt>Agrave</tt> (À).
216      */

217     public static final char Agrave = '\u00c0';
218
219     /**
220      * Unicode character for entity <tt>Aacute</tt> (Á).
221      */

222     public static final char Aacute = '\u00c1';
223
224     /**
225      * Unicode character for entity <tt>Acirc</tt> (Â).
226      */

227     public static final char Acirc = '\u00c2';
228
229     /**
230      * Unicode character for entity <tt>Atilde</tt> (Ã).
231      */

232     public static final char Atilde = '\u00c3';
233
234     /**
235      * Unicode character for entity <tt>Auml</tt> (Ä).
236      */

237     public static final char Auml = '\u00c4';
238
239     /**
240      * Unicode character for entity <tt>Aring</tt> (Å).
241      */

242     public static final char Aring = '\u00c5';
243
244     /**
245      * Unicode character for entity <tt>AElig</tt> (Æ).
246      */

247     public static final char AElig = '\u00c6';
248
249     /**
250      * Unicode character for entity <tt>Ccedil</tt> (Ç).
251      */

252     public static final char Ccedil = '\u00c7';
253
254     /**
255      * Unicode character for entity <tt>Egrave</tt> (È).
256      */

257     public static final char Egrave = '\u00c8';
258
259     /**
260      * Unicode character for entity <tt>Eacute</tt> (É).
261      */

262     public static final char Eacute = '\u00c9';
263
264     /**
265      * Unicode character for entity <tt>Ecirc</tt> (Ê).
266      */

267     public static final char Ecirc = '\u00ca';
268
269     /**
270      * Unicode character for entity <tt>Euml</tt> (Ë).
271      */

272     public static final char Euml = '\u00cb';
273
274     /**
275      * Unicode character for entity <tt>Igrave</tt> (Ì).
276      */

277     public static final char Igrave = '\u00cc';
278
279     /**
280      * Unicode character for entity <tt>Iacute</tt> (Í).
281      */

282     public static final char Iacute = '\u00cd';
283
284     /**
285      * Unicode character for entity <tt>Icirc</tt> (Î).
286      */

287     public static final char Icirc = '\u00ce';
288
289     /**
290      * Unicode character for entity <tt>Iuml</tt> (Ï).
291      */

292     public static final char Iuml = '\u00cf';
293
294     /**
295      * Unicode character for entity <tt>ETH</tt> (Ð).
296      */

297     public static final char ETH = '\u00d0';
298
299     /**
300      * Unicode character for entity <tt>Ntilde</tt> (Ñ).
301      */

302     public static final char Ntilde = '\u00d1';
303
304     /**
305      * Unicode character for entity <tt>Ograve</tt> (Ò).
306      */

307     public static final char Ograve = '\u00d2';
308
309     /**
310      * Unicode character for entity <tt>Oacute</tt> (Ó).
311      */

312     public static final char Oacute = '\u00d3';
313
314     /**
315      * Unicode character for entity <tt>Ocirc</tt> (Ô).
316      */

317     public static final char Ocirc = '\u00d4';
318
319     /**
320      * Unicode character for entity <tt>Otilde</tt> (Õ).
321      */

322     public static final char Otilde = '\u00d5';
323
324     /**
325      * Unicode character for entity <tt>Ouml</tt> (Ö).
326      */

327     public static final char Ouml = '\u00d6';
328
329     /**
330      * Unicode character for entity <tt>times</tt> (×).
331      */

332     public static final char times = '\u00d7';
333
334     /**
335      * Unicode character for entity <tt>Oslash</tt> (Ø).
336      */

337     public static final char Oslash = '\u00d8';
338
339     /**
340      * Unicode character for entity <tt>Ugrave</tt> (Ù).
341      */

342     public static final char Ugrave = '\u00d9';
343
344     /**
345      * Unicode character for entity <tt>Uacute</tt> (Ú).
346      */

347     public static final char Uacute = '\u00da';
348
349     /**
350      * Unicode character for entity <tt>Ucirc</tt> (Û).
351      */

352     public static final char Ucirc = '\u00db';
353
354     /**
355      * Unicode character for entity <tt>Uuml</tt> (Ü).
356      */

357     public static final char Uuml = '\u00dc';
358
359     /**
360      * Unicode character for entity <tt>Yacute</tt> (Ý).
361      */

362     public static final char Yacute = '\u00dd';
363
364     /**
365      * Unicode character for entity <tt>THORN</tt> (Þ).
366      */

367     public static final char THORN = '\u00de';
368
369     /**
370      * Unicode character for entity <tt>szlig</tt> (ß).
371      */

372     public static final char szlig = '\u00df';
373
374     /**
375      * Unicode character for entity <tt>agrave</tt> (à).
376      */

377     public static final char agrave = '\u00e0';
378
379     /**
380      * Unicode character for entity <tt>aacute</tt> (á).
381      */

382     public static final char aacute = '\u00e1';
383
384     /**
385      * Unicode character for entity <tt>acirc</tt> (â).
386      */

387     public static final char acirc = '\u00e2';
388
389     /**
390      * Unicode character for entity <tt>atilde</tt> (ã).
391      */

392     public static final char atilde = '\u00e3';
393
394     /**
395      * Unicode character for entity <tt>auml</tt> (ä).
396      */

397     public static final char auml = '\u00e4';
398
399     /**
400      * Unicode character for entity <tt>aring</tt> (å).
401      */

402     public static final char aring = '\u00e5';
403
404     /**
405      * Unicode character for entity <tt>aelig</tt> (æ).
406      */

407     public static final char aelig = '\u00e6';
408
409     /**
410      * Unicode character for entity <tt>ccedil</tt> (ç).
411      */

412     public static final char ccedil = '\u00e7';
413
414     /**
415      * Unicode character for entity <tt>egrave</tt> (è).
416      */

417     public static final char egrave = '\u00e8';
418
419     /**
420      * Unicode character for entity <tt>eacute</tt> (é).
421      */

422     public static final char eacute = '\u00e9';
423
424     /**
425      * Unicode character for entity <tt>ecirc</tt> (ê).
426      */

427     public static final char ecirc = '\u00ea';
428
429     /**
430      * Unicode character for entity <tt>euml</tt> (ë).
431      */

432     public static final char euml = '\u00eb';
433
434     /**
435      * Unicode character for entity <tt>igrave</tt> (ì).
436      */

437     public static final char igrave = '\u00ec';
438
439     /**
440      * Unicode character for entity <tt>iacute</tt> (í).
441      */

442     public static final char iacute = '\u00ed';
443
444     /**
445      * Unicode character for entity <tt>icirc</tt> (î).
446      */

447     public static final char icirc = '\u00ee';
448
449     /**
450      * Unicode character for entity <tt>iuml</tt> (ï).
451      */

452     public static final char iuml = '\u00ef';
453
454     /**
455      * Unicode character for entity <tt>eth</tt> (ð).
456      */

457     public static final char eth = '\u00f0';
458
459     /**
460      * Unicode character for entity <tt>ntilde</tt> (ñ).
461      */

462     public static final char ntilde = '\u00f1';
463
464     /**
465      * Unicode character for entity <tt>ograve</tt> (ò).
466      */

467     public static final char ograve = '\u00f2';
468
469     /**
470      * Unicode character for entity <tt>oacute</tt> (ó).
471      */

472     public static final char oacute = '\u00f3';
473
474     /**
475      * Unicode character for entity <tt>ocirc</tt> (ô).
476      */

477     public static final char ocirc = '\u00f4';
478
479     /**
480      * Unicode character for entity <tt>otilde</tt> (õ).
481      */

482     public static final char otilde = '\u00f5';
483
484     /**
485      * Unicode character for entity <tt>ouml</tt> (ö).
486      */

487     public static final char ouml = '\u00f6';
488
489     /**
490      * Unicode character for entity <tt>divide</tt> (÷).
491      */

492     public static final char divide = '\u00f7';
493
494     /**
495      * Unicode character for entity <tt>oslash</tt> (ø).
496      */

497     public static final char oslash = '\u00f8';
498
499     /**
500      * Unicode character for entity <tt>ugrave</tt> (ù).
501      */

502     public static final char ugrave = '\u00f9';
503
504     /**
505      * Unicode character for entity <tt>uacute</tt> (ú).
506      */

507     public static final char uacute = '\u00fa';
508
509     /**
510      * Unicode character for entity <tt>ucirc</tt> (û).
511      */

512     public static final char ucirc = '\u00fb';
513
514     /**
515      * Unicode character for entity <tt>uuml</tt> (ü).
516      */

517     public static final char uuml = '\u00fc';
518
519     /**
520      * Unicode character for entity <tt>yacute</tt> (ý).
521      */

522     public static final char yacute = '\u00fd';
523
524     /**
525      * Unicode character for entity <tt>thorn</tt> (þ).
526      */

527     public static final char thorn = '\u00fe';
528
529     /**
530      * Unicode character for entity <tt>yuml</tt> (ÿ).
531      */

532     public static final char yuml = '\u00ff';
533
534     /**
535      * Unicode character for entity <tt>fnof</tt> (ƒ).
536      */

537     public static final char fnof = '\u0192';
538
539     /**
540      * Unicode character for entity <tt>Alpha</tt> (?).
541      */

542     public static final char Alpha = '\u0391';
543
544     /**
545      * Unicode character for entity <tt>Beta</tt> (?).
546      */

547     public static final char Beta = '\u0392';
548
549     /**
550      * Unicode character for entity <tt>Gamma</tt> (?).
551      */

552     public static final char Gamma = '\u0393';
553
554     /**
555      * Unicode character for entity <tt>Delta</tt> (?).
556      */

557     public static final char Delta = '\u0394';
558
559     /**
560      * Unicode character for entity <tt>Epsilon</tt> (?).
561      */

562     public static final char Epsilon = '\u0395';
563
564     /**
565      * Unicode character for entity <tt>Zeta</tt> (?).
566      */

567     public static final char Zeta = '\u0396';
568
569     /**
570      * Unicode character for entity <tt>Eta</tt> (?).
571      */

572     public static final char Eta = '\u0397';
573
574     /**
575      * Unicode character for entity <tt>Theta</tt> (?).
576      */

577     public static final char Theta = '\u0398';
578
579     /**
580      * Unicode character for entity <tt>Iota</tt> (?).
581      */

582     public static final char Iota = '\u0399';
583
584     /**
585      * Unicode character for entity <tt>Kappa</tt> (?).
586      */

587     public static final char Kappa = '\u039a';
588
589     /**
590      * Unicode character for entity <tt>Lambda</tt> (?).
591      */

592     public static final char Lambda = '\u039b';
593
594     /**
595      * Unicode character for entity <tt>Mu</tt> (?).
596      */

597     public static final char Mu = '\u039c';
598
599     /**
600      * Unicode character for entity <tt>Nu</tt> (?).
601      */

602     public static final char Nu = '\u039d';
603
604     /**
605      * Unicode character for entity <tt>Xi</tt> (?).
606      */

607     public static final char Xi = '\u039e';
608
609     /**
610      * Unicode character for entity <tt>Omicron</tt> (?).
611      */

612     public static final char Omicron = '\u039f';
613
614     /**
615      * Unicode character for entity <tt>Pi</tt> (?).
616      */

617     public static final char Pi = '\u03a0';
618
619     /**
620      * Unicode character for entity <tt>Rho</tt> (?).
621      */

622     public static final char Rho = '\u03a1';
623
624     /**
625      * Unicode character for entity <tt>Sigma</tt> (?).
626      */

627     public static final char Sigma = '\u03a3';
628
629     /**
630      * Unicode character for entity <tt>Tau</tt> (?).
631      */

632     public static final char Tau = '\u03a4';
633
634     /**
635      * Unicode character for entity <tt>Upsilon</tt> (?).
636      */

637     public static final char Upsilon = '\u03a5';
638
639     /**
640      * Unicode character for entity <tt>Phi</tt> (?).
641      */

642     public static final char Phi = '\u03a6';
643
644     /**
645      * Unicode character for entity <tt>Chi</tt> (?).
646      */

647     public static final char Chi = '\u03a7';
648
649     /**
650      * Unicode character for entity <tt>Psi</tt> (?).
651      */

652     public static final char Psi = '\u03a8';
653
654     /**
655      * Unicode character for entity <tt>Omega</tt> (?).
656      */

657     public static final char Omega = '\u03a9';
658
659     /**
660      * Unicode character for entity <tt>alpha</tt> (?).
661      */

662     public static final char alpha = '\u03b1';
663
664     /**
665      * Unicode character for entity <tt>beta</tt> (?).
666      */

667     public static final char beta = '\u03b2';
668
669     /**
670      * Unicode character for entity <tt>gamma</tt> (?).
671      */

672     public static final char gamma = '\u03b3';
673
674     /**
675      * Unicode character for entity <tt>delta</tt> (?).
676      */

677     public static final char delta = '\u03b4';
678
679     /**
680      * Unicode character for entity <tt>epsilon</tt> (?).
681      */

682     public static final char epsilon = '\u03b5';
683
684     /**
685      * Unicode character for entity <tt>zeta</tt> (?).
686      */

687     public static final char zeta = '\u03b6';
688
689     /**
690      * Unicode character for entity <tt>eta</tt> (?).
691      */

692     public static final char eta = '\u03b7';
693
694     /**
695      * Unicode character for entity <tt>theta</tt> (?).
696      */

697     public static final char theta = '\u03b8';
698
699     /**
700      * Unicode character for entity <tt>iota</tt> (?).
701      */

702     public static final char iota = '\u03b9';
703
704     /**
705      * Unicode character for entity <tt>kappa</tt> (?).
706      */

707     public static final char kappa = '\u03ba';
708
709     /**
710      * Unicode character for entity <tt>lambda</tt> (?).
711      */

712     public static final char lambda = '\u03bb';
713
714     /**
715      * Unicode character for entity <tt>mu</tt> (?).
716      */

717     public static final char mu = '\u03bc';
718
719     /**
720      * Unicode character for entity <tt>nu</tt> (?).
721      */

722     public static final char nu = '\u03bd';
723
724     /**
725      * Unicode character for entity <tt>xi</tt> (?).
726      */

727     public static final char xi = '\u03be';
728
729     /**
730      * Unicode character for entity <tt>omicron</tt> (?).
731      */

732     public static final char omicron = '\u03bf';
733
734     /**
735      * Unicode character for entity <tt>pi</tt> (?).
736      */

737     public static final char pi = '\u03c0';
738
739     /**
740      * Unicode character for entity <tt>rho</tt> (?).
741      */

742     public static final char rho = '\u03c1';
743
744     /**
745      * Unicode character for entity <tt>sigmaf</tt> (?).
746      */

747     public static final char sigmaf = '\u03c2';
748
749     /**
750      * Unicode character for entity <tt>sigma</tt> (?).
751      */

752     public static final char sigma = '\u03c3';
753
754     /**
755      * Unicode character for entity <tt>tau</tt> (?).
756      */

757     public static final char tau = '\u03c4';
758
759     /**
760      * Unicode character for entity <tt>upsilon</tt> (?).
761      */

762     public static final char upsilon = '\u03c5';
763
764     /**
765      * Unicode character for entity <tt>phi</tt> (?).
766      */

767     public static final char phi = '\u03c6';
768
769     /**
770      * Unicode character for entity <tt>chi</tt> (?).
771      */

772     public static final char chi = '\u03c7';
773
774     /**
775      * Unicode character for entity <tt>psi</tt> (?).
776      */

777     public static final char psi = '\u03c8';
778
779     /**
780      * Unicode character for entity <tt>omega</tt> (?).
781      */

782     public static final char omega = '\u03c9';
783
784     /**
785      * Unicode character for entity <tt>thetasym</tt> (?).
786      */

787     public static final char thetasym = '\u03d1';
788
789     /**
790      * Unicode character for entity <tt>upsih</tt> (?).
791      */

792     public static final char upsih = '\u03d2';
793
794     /**
795      * Unicode character for entity <tt>piv</tt> (?).
796      */

797     public static final char piv = '\u03d6';
798
799     /**
800      * Unicode character for entity <tt>bull</tt> (•).
801      */

802     public static final char bull = '\u2022';
803
804     /**
805      * Unicode character for entity <tt>hellip</tt> (…).
806      */

807     public static final char hellip = '\u2026';
808
809     /**
810      * Unicode character for entity <tt>prime</tt> (?).
811      */

812     public static final char prime = '\u2032';
813
814     /**
815      * Unicode character for entity <tt>Prime</tt> (?).
816      */

817     public static final char Prime = '\u2033';
818
819     /**
820      * Unicode character for entity <tt>oline</tt> (?).
821      */

822     public static final char oline = '\u203e';
823
824     /**
825      * Unicode character for entity <tt>frasl</tt> (?).
826      */

827     public static final char frasl = '\u2044';
828
829     /**
830      * Unicode character for entity <tt>weierp</tt> (?).
831      */

832     public static final char weierp = '\u2118';
833
834     /**
835      * Unicode character for entity <tt>image</tt> (?).
836      */

837     public static final char image = '\u2111';
838
839     /**
840      * Unicode character for entity <tt>real</tt> (?).
841      */

842     public static final char real = '\u211c';
843
844     /**
845      * Unicode character for entity <tt>trade</tt> (™).
846      */

847     public static final char trade = '\u2122';
848
849     /**
850      * Unicode character for entity <tt>alefsym</tt> (?).
851      */

852     public static final char alefsym = '\u2135';
853
854     /**
855      * Unicode character for entity <tt>larr</tt> (?).
856      */

857     public static final char larr = '\u2190';
858
859     /**
860      * Unicode character for entity <tt>uarr</tt> (?).
861      */

862     public static final char uarr = '\u2191';
863
864     /**
865      * Unicode character for entity <tt>rarr</tt> (?).
866      */

867     public static final char rarr = '\u2192';
868
869     /**
870      * Unicode character for entity <tt>darr</tt> (?).
871      */

872     public static final char darr = '\u2193';
873
874     /**
875      * Unicode character for entity <tt>harr</tt> (?).
876      */

877     public static final char harr = '\u2194';
878
879     /**
880      * Unicode character for entity <tt>crarr</tt> (?).
881      */

882     public static final char crarr = '\u21b5';
883
884     /**
885      * Unicode character for entity <tt>lArr</tt> (?).
886      */

887     public static final char lArr = '\u21d0';
888
889     /**
890      * Unicode character for entity <tt>uArr</tt> (?).
891      */

892     public static final char uArr = '\u21d1';
893
894     /**
895      * Unicode character for entity <tt>rArr</tt> (?).
896      */

897     public static final char rArr = '\u21d2';
898
899     /**
900      * Unicode character for entity <tt>dArr</tt> (?).
901      */

902     public static final char dArr = '\u21d3';
903
904     /**
905      * Unicode character for entity <tt>hArr</tt> (?).
906      */

907     public static final char hArr = '\u21d4';
908
909     /**
910      * Unicode character for entity <tt>forall</tt> (?).
911      */

912     public static final char forall = '\u2200';
913
914     /**
915      * Unicode character for entity <tt>part</tt> (?).
916      */

917     public static final char part = '\u2202';
918
919     /**
920      * Unicode character for entity <tt>exist</tt> (?).
921      */

922     public static final char exist = '\u2203';
923
924     /**
925      * Unicode character for entity <tt>empty</tt> (?).
926      */

927     public static final char empty = '\u2205';
928
929     /**
930      * Unicode character for entity <tt>nabla</tt> (?).
931      */

932     public static final char nabla = '\u2207';
933
934     /**
935      * Unicode character for entity <tt>isin</tt> (?).
936      */

937     public static final char isin = '\u2208';
938
939     /**
940      * Unicode character for entity <tt>notin</tt> (?).
941      */

942     public static final char notin = '\u2209';
943
944     /**
945      * Unicode character for entity <tt>ni</tt> (?).
946      */

947     public static final char ni = '\u220b';
948
949     /**
950      * Unicode character for entity <tt>prod</tt> (?).
951      */

952     public static final char prod = '\u220f';
953
954     /**
955      * Unicode character for entity <tt>sum</tt> (?).
956      */

957     public static final char sum = '\u2211';
958
959     /**
960      * Unicode character for entity <tt>minus</tt> (?).
961      */

962     public static final char minus = '\u2212';
963
964     /**
965      * Unicode character for entity <tt>lowast</tt> (?).
966      */

967     public static final char lowast = '\u2217';
968
969     /**
970      * Unicode character for entity <tt>radic</tt> (?).
971      */

972     public static final char radic = '\u221a';
973
974     /**
975      * Unicode character for entity <tt>prop</tt> (?).
976      */

977     public static final char prop = '\u221d';
978
979     /**
980      * Unicode character for entity <tt>infin</tt> (?).
981      */

982     public static final char infin = '\u221e';
983
984     /**
985      * Unicode character for entity <tt>ang</tt> (?).
986      */

987     public static final char ang = '\u2220';
988
989     /**
990      * Unicode character for entity <tt>and</tt> (?).
991      */

992     public static final char and = '\u2227';
993
994     /**
995      * Unicode character for entity <tt>or</tt> (?).
996      */

997     public static final char or = '\u2228';
998
999     /**
1000     * Unicode character for entity <tt>cap</tt> (?).
1001     */

1002    public static final char cap = '\u2229';
1003
1004    /**
1005     * Unicode character for entity <tt>cup</tt> (?).
1006     */

1007    public static final char cup = '\u222a';
1008
1009    /**
1010     * Unicode character for entity <tt>int</tt> (?).
1011     */

1012    public static final char intChar = '\u222b';
1013
1014    /**
1015     * Unicode character for entity <tt>there4</tt> (?).
1016     */

1017    public static final char there4 = '\u2234';
1018
1019    /**
1020     * Unicode character for entity <tt>sim</tt> (?).
1021     */

1022    public static final char sim = '\u223c';
1023
1024    /**
1025     * Unicode character for entity <tt>cong</tt> (?).
1026     */

1027    public static final char cong = '\u2245';
1028
1029    /**
1030     * Unicode character for entity <tt>asymp</tt> (?).
1031     */

1032    public static final char asymp = '\u2248';
1033
1034    /**
1035     * Unicode character for entity <tt>ne</tt> (?).
1036     */

1037    public static final char ne = '\u2260';
1038
1039    /**
1040     * Unicode character for entity <tt>equiv</tt> (?).
1041     */

1042    public static final char equiv = '\u2261';
1043
1044    /**
1045     * Unicode character for entity <tt>le</tt> (?).
1046     */

1047    public static final char le = '\u2264';
1048
1049    /**
1050     * Unicode character for entity <tt>ge</tt> (?).
1051     */

1052    public static final char ge = '\u2265';
1053
1054    /**
1055     * Unicode character for entity <tt>sub</tt> (?).
1056     */

1057    public static final char sub = '\u2282';
1058
1059    /**
1060     * Unicode character for entity <tt>sup</tt> (?).
1061     */

1062    public static final char sup = '\u2283';
1063
1064    /**
1065     * Unicode character for entity <tt>nsub</tt> (?).
1066     */

1067    public static final char nsub = '\u2284';
1068
1069    /**
1070     * Unicode character for entity <tt>sube</tt> (?).
1071     */

1072    public static final char sube = '\u2286';
1073
1074    /**
1075     * Unicode character for entity <tt>supe</tt> (?).
1076     */

1077    public static final char supe = '\u2287';
1078
1079    /**
1080     * Unicode character for entity <tt>oplus</tt> (?).
1081     */

1082    public static final char oplus = '\u2295';
1083
1084    /**
1085     * Unicode character for entity <tt>otimes</tt> (?).
1086     */

1087    public static final char otimes = '\u2297';
1088
1089    /**
1090     * Unicode character for entity <tt>perp</tt> (?).
1091     */

1092    public static final char perp = '\u22a5';
1093
1094    /**
1095     * Unicode character for entity <tt>sdot</tt> (?).
1096     */

1097    public static final char sdot = '\u22c5';
1098
1099    /**
1100     * Unicode character for entity <tt>lceil</tt> (?).
1101     */

1102    public static final char lceil = '\u2308';
1103
1104    /**
1105     * Unicode character for entity <tt>rceil</tt> (?).
1106     */

1107    public static final char rceil = '\u2309';
1108
1109    /**
1110     * Unicode character for entity <tt>lfloor</tt> (?).
1111     */

1112    public static final char lfloor = '\u230a';
1113
1114    /**
1115     * Unicode character for entity <tt>rfloor</tt> (?).
1116     */

1117    public static final char rfloor = '\u230b';
1118
1119    /**
1120     * Unicode character for entity <tt>lang</tt> (?).
1121     */

1122    public static final char lang = '\u2329';
1123
1124    /**
1125     * Unicode character for entity <tt>rang</tt> (?).
1126     */

1127    public static final char rang = '\u232a';
1128
1129    /**
1130     * Unicode character for entity <tt>loz</tt> (?).
1131     */

1132    public static final char loz = '\u25ca';
1133
1134    /**
1135     * Unicode character for entity <tt>spades</tt> (?).
1136     */

1137    public static final char spades = '\u2660';
1138
1139    /**
1140     * Unicode character for entity <tt>clubs</tt> (?).
1141     */

1142    public static final char clubs = '\u2663';
1143
1144    /**
1145     * Unicode character for entity <tt>hearts</tt> (?).
1146     */

1147    public static final char hearts = '\u2665';
1148
1149    /**
1150     * Unicode character for entity <tt>diams</tt> (?).
1151     */

1152    public static final char diams = '\u2666';
1153
1154    /**
1155     * Unicode character for entity <tt>OElig</tt> (Œ).
1156     */

1157    public static final char OElig = '\u0152';
1158
1159    /**
1160     * Unicode character for entity <tt>oelig</tt> (œ).
1161     */

1162    public static final char oelig = '\u0153';
1163
1164    /**
1165     * Unicode character for entity <tt>Scaron</tt> (Š).
1166     */

1167    public static final char Scaron = '\u0160';
1168
1169    /**
1170     * Unicode character for entity <tt>scaron</tt> (š).
1171     */

1172    public static final char scaron = '\u0161';
1173
1174    /**
1175     * Unicode character for entity <tt>Yuml</tt> (Ÿ).
1176     */

1177    public static final char Yuml = '\u0178';
1178
1179    /**
1180     * Unicode character for entity <tt>circ</tt> (ˆ).
1181     */

1182    public static final char circ = '\u02c6';
1183
1184    /**
1185     * Unicode character for entity <tt>tilde</tt> (˜).
1186     */

1187    public static final char tilde = '\u02dc';
1188
1189    /**
1190     * Unicode character for entity <tt>ensp</tt> (?).
1191     */

1192    public static final char ensp = '\u2002';
1193
1194    /**
1195     * Unicode character for entity <tt>emsp</tt> (?).
1196     */

1197    public static final char emsp = '\u2003';
1198
1199    /**
1200     * Unicode character for entity <tt>thinsp</tt> (?).
1201     */

1202    public static final char thinsp = '\u2009';
1203
1204    /**
1205     * Unicode character for entity <tt>zwnj</tt> (?).
1206     */

1207    public static final char zwnj = '\u200c';
1208
1209    /**
1210     * Unicode character for entity <tt>zwj</tt> (?).
1211     */

1212    public static final char zwj = '\u200d';
1213
1214    /**
1215     * Unicode character for entity <tt>lrm</tt> (?).
1216     */

1217    public static final char lrm = '\u200e';
1218
1219    /**
1220     * Unicode character for entity <tt>rlm</tt> (?).
1221     */

1222    public static final char rlm = '\u200f';
1223
1224    /**
1225     * Unicode character for entity <tt>ndash</tt> (–).
1226     */

1227    public static final char ndash = '\u2013';
1228
1229    /**
1230     * Unicode character for entity <tt>mdash</tt> (—).
1231     */

1232    public static final char mdash = '\u2014';
1233
1234    /**
1235     * Unicode character for entity <tt>lsquo</tt> (‘).
1236     */

1237    public static final char lsquo = '\u2018';
1238
1239    /**
1240     * Unicode character for entity <tt>rsquo</tt> (’).
1241     */

1242    public static final char rsquo = '\u2019';
1243
1244    /**
1245     * Unicode character for entity <tt>sbquo</tt> (‚).
1246     */

1247    public static final char sbquo = '\u201a';
1248
1249    /**
1250     * Unicode character for entity <tt>ldquo</tt> (“).
1251     */

1252    public static final char ldquo = '\u201c';
1253
1254    /**
1255     * Unicode character for entity <tt>rdquo</tt> (”).
1256     */

1257    public static final char rdquo = '\u201d';
1258
1259    /**
1260     * Unicode character for entity <tt>bdquo</tt> („).
1261     */

1262    public static final char bdquo = '\u201e';
1263
1264    /**
1265     * Unicode character for entity <tt>dagger</tt> (†).
1266     */

1267    public static final char dagger = '\u2020';
1268
1269    /**
1270     * Unicode character for entity <tt>Dagger</tt> (‡).
1271     */

1272    public static final char Dagger = '\u2021';
1273
1274    /**
1275     * Unicode character for entity <tt>permil</tt> (‰).
1276     */

1277    public static final char permil = '\u2030';
1278
1279    /**
1280     * Unicode character for entity <tt>lsaquo</tt> (‹).
1281     */

1282    public static final char lsaquo = '\u2039';
1283
1284    /**
1285     * Unicode character for entity <tt>rsaquo</tt> (›).
1286     */

1287    public static final char rsaquo = '\u203a';
1288
1289    /**
1290     * Unicode character for entity <tt>euro</tt> (€).
1291     */

1292    public static final char euro = '\u20ac';
1293
1294    /**
1295     * Prevent instanciation.
1296     */

1297    private HTMLEntities() {
1298    }
1299
1300    /**
1301     * Convert a text character to an entity name. This does
1302     * not include newer character entities that are not supported
1303     * by HTML 3.2 browsers.
1304     *
1305     * @return The entity name or null if there is no entity for the
1306     * character.
1307     */

1308    public static final String JavaDoc charToEntity(char textChar) {
1309        switch (textChar) {
1310        //
1311
// Character entity references for markup-significant
1312
//
1313
case '\u0022': return "quot";
1314        case '\u0026': return "amp";
1315        case '\u003c': return "lt";
1316        case '\u003e': return "gt";
1317        case '\u00a0': return "nbsp";
1318        //
1319
// Character entity references for ISO 8859-1 characters
1320
//
1321
case '\u00a1': return "iexcl";
1322        case '\u00a2': return "cent";
1323        case '\u00a3': return "pound";
1324        case '\u00a4': return "curren";
1325        case '\u00a5': return "yen";
1326        case '\u00a6': return "brvbar";
1327        case '\u00a7': return "sect";
1328        case '\u00a8': return "uml";
1329        case '\u00a9': return "copy";
1330        case '\u00aa': return "ordf";
1331        case '\u00ab': return "laquo";
1332        case '\u00ac': return "not";
1333        case '\u00ad': return "shy";
1334        case '\u00ae': return "reg";
1335        case '\u00af': return "macr";
1336        case '\u00b0': return "deg";
1337        case '\u00b1': return "plusmn";
1338        case '\u00b2': return "sup2";
1339        case '\u00b3': return "sup3";
1340        case '\u00b4': return "acute";
1341        case '\u00b5': return "micro";
1342        case '\u00b6': return "para";
1343        case '\u00b7': return "middot";
1344        case '\u00b8': return "cedil";
1345        case '\u00b9': return "sup1";
1346        case '\u00ba': return "ordm";
1347        case '\u00bb': return "raquo";
1348        case '\u00bc': return "frac14";
1349        case '\u00bd': return "frac12";
1350        case '\u00be': return "frac34";
1351        case '\u00bf': return "iquest";
1352        case '\u00c0': return "Agrave";
1353        case '\u00c1': return "Aacute";
1354        case '\u00c2': return "Acirc";
1355        case '\u00c3': return "Atilde";
1356        case '\u00c4': return "Auml";
1357        case '\u00c5': return "Aring";
1358        case '\u00c6': return "AElig";
1359        case '\u00c7': return "Ccedil";
1360        case '\u00c8': return "Egrave";
1361        case '\u00c9': return "Eacute";
1362        case '\u00ca': return "Ecirc";
1363        case '\u00cb': return "Euml";
1364        case '\u00cc': return "Igrave";
1365        case '\u00cd': return "Iacute";
1366        case '\u00ce': return "Icirc";
1367        case '\u00cf': return "Iuml";
1368        case '\u00d0': return "ETH";
1369        case '\u00d1': return "Ntilde";
1370        case '\u00d2': return "Ograve";
1371        case '\u00d3': return "Oacute";
1372        case '\u00d4': return "Ocirc";
1373        case '\u00d5': return "Otilde";
1374        case '\u00d6': return "Ouml";
1375        case '\u00d7': return "times";
1376        case '\u00d8': return "Oslash";
1377        case '\u00d9': return "Ugrave";
1378        case '\u00da': return "Uacute";
1379        case '\u00db': return "Ucirc";
1380        case '\u00dc': return "Uuml";
1381        case '\u00dd': return "Yacute";
1382        case '\u00de': return "THORN";
1383        case '\u00df': return "szlig";
1384        case '\u00e0': return "agrave";
1385        case '\u00e1': return "aacute";
1386        case '\u00e2': return "acirc";
1387        case '\u00e3': return "atilde";
1388        case '\u00e4': return "auml";
1389        case '\u00e5': return "aring";
1390        case '\u00e6': return "aelig";
1391        case '\u00e7': return "ccedil";
1392        case '\u00e8': return "egrave";
1393        case '\u00e9': return "eacute";
1394        case '\u00ea': return "ecirc";
1395        case '\u00eb': return "euml";
1396        case '\u00ec': return "igrave";
1397        case '\u00ed': return "iacute";
1398        case '\u00ee': return "icirc";
1399        case '\u00ef': return "iuml";
1400        case '\u00f0': return "eth";
1401        case '\u00f1': return "ntilde";
1402        case '\u00f2': return "ograve";
1403        case '\u00f3': return "oacute";
1404        case '\u00f4': return "ocirc";
1405        case '\u00f5': return "otilde";
1406        case '\u00f6': return "ouml";
1407        case '\u00f7': return "divide";
1408        case '\u00f8': return "oslash";
1409        case '\u00f9': return "ugrave";
1410        case '\u00fa': return "uacute";
1411        case '\u00fb': return "ucirc";
1412        case '\u00fc': return "uuml";
1413        case '\u00fd': return "yacute";
1414        case '\u00fe': return "thorn";
1415        case '\u00ff': return "yuml";
1416        default:
1417            return null;
1418        }
1419    }
1420
1421    /**
1422     * Convert a text character to a HTML 4.0 entity name.
1423     * THis includes newer character entities that are not supported
1424     * by HTML 3.2 browsers.
1425     *
1426     * @return The entity name or null if there is no entity for the
1427     * character.
1428     */

1429    public static String JavaDoc charToEntity4(char textChar) {
1430        String JavaDoc charStr = charToEntity(textChar);
1431        if (charStr != null) {
1432            return charStr;
1433        }
1434        switch (textChar) {
1435        //
1436
// Character entity references for symbols, mathematical symbols, and Greek letters
1437
//
1438
// Latin Extended
1439
case '\u0192': return "fnof";
1440        //
1441
// Greek
1442
case '\u0391': return "Alpha";
1443        case '\u0392': return "Beta";
1444        case '\u0393': return "Gamma";
1445        case '\u0394': return "Delta";
1446        case '\u0395': return "Epsilon";
1447        case '\u0396': return "Zeta";
1448        case '\u0397': return "Eta";
1449        case '\u0398': return "Theta";
1450        case '\u0399': return "Iota";
1451        case '\u039a': return "Kappa";
1452        case '\u039b': return "Lambda";
1453        case '\u039c': return "Mu";
1454        case '\u039d': return "Nu";
1455        case '\u039e': return "Xi";
1456        case '\u039f': return "Omicron";
1457        case '\u03a0': return "Pi";
1458        case '\u03a1': return "Rho";
1459        case '\u03a3': return "Sigma";
1460        case '\u03a4': return "Tau";
1461        case '\u03a5': return "Upsilon";
1462        case '\u03a6': return "Phi";
1463        case '\u03a7': return "Chi";
1464        case '\u03a8': return "Psi";
1465        case '\u03a9': return "Omega";
1466        case '\u03b1': return "alpha";
1467        case '\u03b2': return "beta";
1468        case '\u03b3': return "gamma";
1469        case '\u03b4': return "delta";
1470        case '\u03b5': return "epsilon";
1471        case '\u03b6': return "zeta";
1472        case '\u03b7': return "eta";
1473        case '\u03b8': return "theta";
1474        case '\u03b9': return "iota";
1475        case '\u03ba': return "kappa";
1476        case '\u03bb': return "lambda";
1477        case '\u03bc': return "mu";
1478        case '\u03bd': return "nu";
1479        case '\u03be': return "xi";
1480        case '\u03bf': return "omicron";
1481        case '\u03c0': return "pi";
1482        case '\u03c1': return "rho";
1483        case '\u03c2': return "sigmaf";
1484        case '\u03c3': return "sigma";
1485        case '\u03c4': return "tau";
1486        case '\u03c5': return "upsilon";
1487        case '\u03c6': return "phi";
1488        case '\u03c7': return "chi";
1489        case '\u03c8': return "psi";
1490        case '\u03c9': return "omega";
1491        case '\u03d1': return "thetasym";
1492        case '\u03d2': return "upsih";
1493        case '\u03d6': return "piv";
1494        //
1495
// General Punctuation
1496
case '\u2022': return "bull";
1497        case '\u2026': return "hellip";
1498        case '\u2032': return "prime";
1499        case '\u2033': return "Prime";
1500        case '\u203e': return "oline";
1501        case '\u2044': return "frasl";
1502        //
1503
// Letterlike Symbols
1504
case '\u2118': return "weierp";
1505        case '\u2111': return "image";
1506        case '\u211c': return "real";
1507        case '\u2122': return "trade";
1508        case '\u2135': return "alefsym";
1509        //
1510
// Arrows
1511
case '\u2190': return "larr";
1512        case '\u2191': return "uarr";
1513        case '\u2192': return "rarr";
1514        case '\u2193': return "darr";
1515        case '\u2194': return "harr";
1516        case '\u21b5': return "crarr";
1517        case '\u21d0': return "lArr";
1518        case '\u21d1': return "uArr";
1519        case '\u21d2': return "rArr";
1520        case '\u21d3': return "dArr";
1521        case '\u21d4': return "hArr";
1522        //
1523
// Mathematical Operators
1524
case '\u2200': return "forall";
1525        case '\u2202': return "part";
1526        case '\u2203': return "exist";
1527        case '\u2205': return "empty";
1528        case '\u2207': return "nabla";
1529        case '\u2208': return "isin";
1530        case '\u2209': return "notin";
1531        case '\u220b': return "ni";
1532        case '\u220f': return "prod";
1533        case '\u2211': return "sum";
1534        case '\u2212': return "minus";
1535        case '\u2217': return "lowast";
1536        case '\u221a': return "radic";
1537        case '\u221d': return "prop";
1538        case '\u221e': return "infin";
1539        case '\u2220': return "ang";
1540        case '\u2227': return "and";
1541        case '\u2228': return "or";
1542        case '\u2229': return "cap";
1543        case '\u222a': return "cup";
1544        case '\u222b': return "int";
1545        case '\u2234': return "there4";
1546        case '\u223c': return "sim";
1547        case '\u2245': return "cong";
1548        case '\u2248': return "asymp";
1549        case '\u2260': return "ne";
1550        case '\u2261': return "equiv";
1551        case '\u2264': return "le";
1552        case '\u2265': return "ge";
1553        case '\u2282': return "sub";
1554        case '\u2283': return "sup";
1555        case '\u2284': return "nsub";
1556        case '\u2286': return "sube";
1557        case '\u2287': return "supe";
1558        case '\u2295': return "oplus";
1559        case '\u2297': return "otimes";
1560        case '\u22a5': return "perp";
1561        case '\u22c5': return "sdot";
1562        //
1563
// Miscellaneous Technical
1564
case '\u2308': return "lceil";
1565        case '\u2309': return "rceil";
1566        case '\u230a': return "lfloor";
1567        case '\u230b': return "rfloor";
1568        case '\u2329': return "lang";
1569        case '\u232a': return "rang";
1570        //
1571
// Geometric Shapes
1572
case '\u25ca': return "loz";
1573        //
1574
// Miscellaneous Symbols
1575
case '\u2660': return "spades";
1576        case '\u2663': return "clubs";
1577        case '\u2665': return "hearts";
1578        case '\u2666': return "diams";
1579        //
1580
// Character entity references for internationalization characters
1581
//
1582
// Latin Extended-A
1583
case '\u0152': return "OElig";
1584        case '\u0153': return "oelig";
1585        case '\u0160': return "Scaron";
1586        case '\u0161': return "scaron";
1587        case '\u0178': return "Yuml";
1588        //
1589
// Spacing Modifier Letters
1590
case '\u02c6': return "circ";
1591        case '\u02dc': return "tilde";
1592        //
1593
// General Punctuation
1594
case '\u2002': return "ensp";
1595        case '\u2003': return "emsp";
1596        case '\u2009': return "thinsp";
1597        case '\u200c': return "zwnj";
1598        case '\u200d': return "zwj";
1599        case '\u200e': return "lrm";
1600        case '\u200f': return "rlm";
1601        case '\u2013': return "ndash";
1602        case '\u2014': return "mdash";
1603        case '\u2018': return "lsquo";
1604        case '\u2019': return "rsquo";
1605        case '\u201a': return "sbquo";
1606        case '\u201c': return "ldquo";
1607        case '\u201d': return "rdquo";
1608        case '\u201e': return "bdquo";
1609        case '\u2020': return "dagger";
1610        case '\u2021': return "Dagger";
1611        case '\u2030': return "permil";
1612        case '\u2039': return "lsaquo";
1613        case '\u203a': return "rsaquo";
1614        case '\u20ac': return "euro";
1615        default:
1616            return null;
1617        }
1618    }
1619}
1620
Popular Tags