001: /* Copyright (c) 2006-2007, Vladimir Nikic
002: All rights reserved.
003:
004: Redistribution and use of this software in source and binary forms,
005: with or without modification, are permitted provided that the following
006: conditions are met:
007:
008: * Redistributions of source code must retain the above
009: copyright notice, this list of conditions and the
010: following disclaimer.
011:
012: * Redistributions in binary form must reproduce the above
013: copyright notice, this list of conditions and the
014: following disclaimer in the documentation and/or other
015: materials provided with the distribution.
016:
017: * The name of HtmlCleaner may not be used to endorse or promote
018: products derived from this software without specific prior
019: written permission.
020:
021: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
022: AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
023: IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
024: ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
025: LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
026: CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
027: SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
028: INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
029: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
030: ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
031: POSSIBILITY OF SUCH DAMAGE.
032:
033: You can contact Vladimir Nikic by sending e-mail to
034: nikic_vladimir@yahoo.com. Please include the word "HtmlCleaner" in the
035: subject line.
036: */
037:
038: package org.htmlcleaner;
039:
040: import java.util.HashMap;
041: import java.util.Map;
042:
043: /**
044: * <p>This class contains map with special entities used in HTML and their
045: * unicodes.</p>
046: *
047: * Created by: Vladimir Nikic<br/>
048: * Date: November, 2006.
049: */
050: public class SpecialEntities {
051:
052: static Map entities = new HashMap();
053:
054: static {
055: entities.put("nbsp", new Integer(160));
056: entities.put("iexcl", new Integer(161));
057: entities.put("curren", new Integer(164));
058: entities.put("cent", new Integer(162));
059: entities.put("pound", new Integer(163));
060: entities.put("yen", new Integer(165));
061: entities.put("brvbar", new Integer(166));
062: entities.put("sect", new Integer(167));
063: entities.put("uml", new Integer(168));
064: entities.put("copy", new Integer(169));
065: entities.put("ordf", new Integer(170));
066: entities.put("laquo", new Integer(171));
067: entities.put("not", new Integer(172));
068: entities.put("shy", new Integer(173));
069: entities.put("reg", new Integer(174));
070: entities.put("trade", new Integer(8482));
071: entities.put("macr", new Integer(175));
072: entities.put("deg", new Integer(176));
073: entities.put("plusmn", new Integer(177));
074: entities.put("sup2", new Integer(178));
075: entities.put("sup3", new Integer(179));
076: entities.put("acute", new Integer(180));
077: entities.put("micro", new Integer(181));
078: entities.put("para", new Integer(182));
079: entities.put("middot", new Integer(183));
080: entities.put("cedil", new Integer(184));
081: entities.put("sup1", new Integer(185));
082: entities.put("ordm", new Integer(186));
083: entities.put("raquo", new Integer(187));
084: entities.put("frac14", new Integer(188));
085: entities.put("frac12", new Integer(189));
086: entities.put("frac34", new Integer(190));
087: entities.put("iquest", new Integer(191));
088: entities.put("times", new Integer(215));
089: entities.put("divide", new Integer(247));
090:
091: entities.put("Agrave", new Integer(192));
092: entities.put("Aacute", new Integer(193));
093: entities.put("Acirc", new Integer(194));
094: entities.put("Atilde", new Integer(195));
095: entities.put("Auml", new Integer(196));
096: entities.put("Aring", new Integer(197));
097: entities.put("AElig", new Integer(198));
098: entities.put("Ccedil", new Integer(199));
099: entities.put("Egrave", new Integer(200));
100: entities.put("Eacute", new Integer(201));
101: entities.put("Ecirc", new Integer(202));
102: entities.put("Euml", new Integer(203));
103: entities.put("Igrave", new Integer(204));
104: entities.put("Iacute", new Integer(205));
105: entities.put("Icirc", new Integer(206));
106: entities.put("Iuml", new Integer(207));
107: entities.put("ETH", new Integer(208));
108: entities.put("Ntilde", new Integer(209));
109: entities.put("Ograve", new Integer(210));
110: entities.put("Oacute", new Integer(211));
111: entities.put("Ocirc", new Integer(212));
112: entities.put("Otilde", new Integer(213));
113: entities.put("Ouml", new Integer(214));
114: entities.put("Oslash", new Integer(216));
115: entities.put("Ugrave", new Integer(217));
116: entities.put("Uacute", new Integer(218));
117: entities.put("Ucirc", new Integer(219));
118: entities.put("Uuml", new Integer(220));
119: entities.put("Yacute", new Integer(221));
120: entities.put("THORN", new Integer(222));
121: entities.put("szlig", new Integer(223));
122: entities.put("agrave", new Integer(224));
123: entities.put("aacute", new Integer(225));
124: entities.put("acirc", new Integer(226));
125: entities.put("atilde", new Integer(227));
126: entities.put("auml", new Integer(228));
127: entities.put("aring", new Integer(229));
128: entities.put("aelig", new Integer(230));
129: entities.put("ccedil", new Integer(231));
130: entities.put("egrave", new Integer(232));
131: entities.put("eacute", new Integer(233));
132: entities.put("ecirc", new Integer(234));
133: entities.put("euml", new Integer(235));
134: entities.put("igrave", new Integer(236));
135: entities.put("iacute", new Integer(237));
136: entities.put("icirc", new Integer(238));
137: entities.put("iuml", new Integer(239));
138: entities.put("eth", new Integer(240));
139: entities.put("ntilde", new Integer(241));
140: entities.put("ograve", new Integer(242));
141: entities.put("oacute", new Integer(243));
142: entities.put("ocirc", new Integer(244));
143: entities.put("otilde", new Integer(245));
144: entities.put("ouml", new Integer(246));
145: entities.put("oslash", new Integer(248));
146: entities.put("ugrave", new Integer(249));
147: entities.put("uacute", new Integer(250));
148: entities.put("ucirc", new Integer(251));
149: entities.put("uuml", new Integer(252));
150: entities.put("yacute", new Integer(253));
151: entities.put("thorn", new Integer(254));
152: entities.put("yuml", new Integer(255));
153:
154: entities.put("OElig", new Integer(338));
155: entities.put("oelig", new Integer(339));
156: entities.put("Scaron", new Integer(352));
157: entities.put("scaron", new Integer(353));
158: entities.put("Yuml", new Integer(376));
159: entities.put("circ", new Integer(710));
160: entities.put("tilde", new Integer(732));
161: entities.put("ensp", new Integer(8194));
162: entities.put("emsp", new Integer(8195));
163: entities.put("thinsp", new Integer(8201));
164: entities.put("zwnj", new Integer(8204));
165: entities.put("zwj", new Integer(8205));
166: entities.put("lrm", new Integer(8206));
167: entities.put("rlm", new Integer(8207));
168: entities.put("ndash", new Integer(8211));
169: entities.put("mdash", new Integer(8212));
170: entities.put("lsquo", new Integer(8216));
171: entities.put("rsquo", new Integer(8217));
172: entities.put("sbquo", new Integer(8218));
173: entities.put("ldquo", new Integer(8220));
174: entities.put("rdquo", new Integer(8221));
175: entities.put("bdquo", new Integer(8222));
176: entities.put("dagger", new Integer(8224));
177: entities.put("Dagger", new Integer(8225));
178: entities.put("hellip", new Integer(8230));
179: entities.put("permil", new Integer(8240));
180: entities.put("lsaquo", new Integer(8249));
181: entities.put("rsaquo", new Integer(8250));
182: entities.put("euro", new Integer(8364));
183: }
184:
185: }
|