⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 entitiestounicode.java

📁 iText是一个能够快速产生PDF文件的java类库。iText的java类对于那些要产生包含文本
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
/*
 * $Id: EntitiesToUnicode.java 2625 2007-02-27 13:02:57Z blowagie $
 * $Name$
 *
 * Copyright 2003-2007 Paulo Soares and Bruno Lowagie.
 *
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * (the "License"); you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the License.
 *
 * The Original Code is 'iText, a free JAVA-PDF library'.
 *
 * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
 * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
 * All Rights Reserved.
 * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
 * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
 *
 * Contributor(s): all the names of the contributors are added in the source code
 * where applicable.
 *
 * Alternatively, the contents of this file may be used under the terms of the
 * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
 * provisions of LGPL are applicable instead of those above.  If you wish to
 * allow use of your version of this file only under the terms of the LGPL
 * License and not to allow others to use your version of this file under
 * the MPL, indicate your decision by deleting the provisions above and
 * replace them with the notice and other provisions required by the LGPL.
 * If you do not delete the provisions above, a recipient may use your version
 * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
 *
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the MPL as stated above or under the terms of the GNU
 * Library General Public License as published by the Free Software Foundation;
 * either version 2 of the License, or any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
 * details.
 *
 * If you didn't download this code from the following link, you should check if
 * you aren't using an obsolete version:
 * http://www.lowagie.com/iText/
 */

package com.lowagie.text.xml.simpleparser;

import java.util.HashMap;

/**
 * This class contains entities that can be used in an entity tag.
 */

public class EntitiesToUnicode {
    
    /**
     * This is a map that contains the names of entities and their unicode value.
     */
    public static final HashMap map = new HashMap();
    static {
        map.put("nbsp", new Character('\u00a0')); // no-break space = non-breaking space, U+00A0 ISOnum
        map.put("iexcl", new Character('\u00a1')); // inverted exclamation mark, U+00A1 ISOnum
        map.put("cent", new Character('\u00a2')); // cent sign, U+00A2 ISOnum
        map.put("pound", new Character('\u00a3')); // pound sign, U+00A3 ISOnum
        map.put("curren", new Character('\u00a4')); // currency sign, U+00A4 ISOnum
        map.put("yen", new Character('\u00a5')); // yen sign = yuan sign, U+00A5 ISOnum
        map.put("brvbar", new Character('\u00a6')); // broken bar = broken vertical bar, U+00A6 ISOnum
        map.put("sect", new Character('\u00a7')); // section sign, U+00A7 ISOnum
        map.put("uml", new Character('\u00a8')); // diaeresis = spacing diaeresis, U+00A8 ISOdia
        map.put("copy", new Character('\u00a9')); // copyright sign, U+00A9 ISOnum
        map.put("ordf", new Character('\u00aa')); // feminine ordinal indicator, U+00AA ISOnum
        map.put("laquo", new Character('\u00ab')); // left-pointing double angle quotation mark = left pointing guillemet, U+00AB ISOnum
        map.put("not", new Character('\u00ac')); // not sign, U+00AC ISOnum
        map.put("shy", new Character('\u00ad')); // soft hyphen = discretionary hyphen, U+00AD ISOnum
        map.put("reg", new Character('\u00ae')); // registered sign = registered trade mark sign, U+00AE ISOnum
        map.put("macr", new Character('\u00af')); // macron = spacing macron = overline = APL overbar, U+00AF ISOdia
        map.put("deg", new Character('\u00b0')); // degree sign, U+00B0 ISOnum
        map.put("plusmn", new Character('\u00b1')); // plus-minus sign = plus-or-minus sign, U+00B1 ISOnum
        map.put("sup2", new Character('\u00b2')); // superscript two = superscript digit two = squared, U+00B2 ISOnum
        map.put("sup3", new Character('\u00b3')); // superscript three = superscript digit three = cubed, U+00B3 ISOnum
        map.put("acute", new Character('\u00b4')); // acute accent = spacing acute, U+00B4 ISOdia
        map.put("micro", new Character('\u00b5')); // micro sign, U+00B5 ISOnum
        map.put("para", new Character('\u00b6')); // pilcrow sign = paragraph sign, U+00B6 ISOnum
        map.put("middot", new Character('\u00b7')); // middle dot = Georgian comma = Greek middle dot, U+00B7 ISOnum
        map.put("cedil", new Character('\u00b8')); // cedilla = spacing cedilla, U+00B8 ISOdia
        map.put("sup1", new Character('\u00b9')); // superscript one = superscript digit one, U+00B9 ISOnum
        map.put("ordm", new Character('\u00ba')); // masculine ordinal indicator, U+00BA ISOnum
        map.put("raquo", new Character('\u00bb')); // right-pointing double angle quotation mark = right pointing guillemet, U+00BB ISOnum
        map.put("frac14", new Character('\u00bc')); // vulgar fraction one quarter = fraction one quarter, U+00BC ISOnum
        map.put("frac12", new Character('\u00bd')); // vulgar fraction one half = fraction one half, U+00BD ISOnum
        map.put("frac34", new Character('\u00be')); // vulgar fraction three quarters = fraction three quarters, U+00BE ISOnum
        map.put("iquest", new Character('\u00bf')); // inverted question mark = turned question mark, U+00BF ISOnum
        map.put("Agrave", new Character('\u00c0')); // latin capital letter A with grave = latin capital letter A grave, U+00C0 ISOlat1
        map.put("Aacute", new Character('\u00c1')); // latin capital letter A with acute, U+00C1 ISOlat1
        map.put("Acirc", new Character('\u00c2')); // latin capital letter A with circumflex, U+00C2 ISOlat1
        map.put("Atilde", new Character('\u00c3')); // latin capital letter A with tilde, U+00C3 ISOlat1
        map.put("Auml", new Character('\u00c4')); // latin capital letter A with diaeresis, U+00C4 ISOlat1
        map.put("Aring", new Character('\u00c5')); // latin capital letter A with ring above = latin capital letter A ring, U+00C5 ISOlat1
        map.put("AElig", new Character('\u00c6')); // latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1
        map.put("Ccedil", new Character('\u00c7')); // latin capital letter C with cedilla, U+00C7 ISOlat1
        map.put("Egrave", new Character('\u00c8')); // latin capital letter E with grave, U+00C8 ISOlat1
        map.put("Eacute", new Character('\u00c9')); // latin capital letter E with acute, U+00C9 ISOlat1
        map.put("Ecirc", new Character('\u00ca')); // latin capital letter E with circumflex, U+00CA ISOlat1
        map.put("Euml", new Character('\u00cb')); // latin capital letter E with diaeresis, U+00CB ISOlat1
        map.put("Igrave", new Character('\u00cc')); // latin capital letter I with grave, U+00CC ISOlat1
        map.put("Iacute", new Character('\u00cd')); // latin capital letter I with acute, U+00CD ISOlat1
        map.put("Icirc", new Character('\u00ce')); // latin capital letter I with circumflex, U+00CE ISOlat1
        map.put("Iuml", new Character('\u00cf')); // latin capital letter I with diaeresis, U+00CF ISOlat1
        map.put("ETH", new Character('\u00d0')); // latin capital letter ETH, U+00D0 ISOlat1
        map.put("Ntilde", new Character('\u00d1')); // latin capital letter N with tilde, U+00D1 ISOlat1
        map.put("Ograve", new Character('\u00d2')); // latin capital letter O with grave, U+00D2 ISOlat1
        map.put("Oacute", new Character('\u00d3')); // latin capital letter O with acute, U+00D3 ISOlat1
        map.put("Ocirc", new Character('\u00d4')); // latin capital letter O with circumflex, U+00D4 ISOlat1
        map.put("Otilde", new Character('\u00d5')); // latin capital letter O with tilde, U+00D5 ISOlat1
        map.put("Ouml", new Character('\u00d6')); // latin capital letter O with diaeresis, U+00D6 ISOlat1
        map.put("times", new Character('\u00d7')); // multiplication sign, U+00D7 ISOnum
        map.put("Oslash", new Character('\u00d8')); // latin capital letter O with stroke = latin capital letter O slash, U+00D8 ISOlat1
        map.put("Ugrave", new Character('\u00d9')); // latin capital letter U with grave, U+00D9 ISOlat1
        map.put("Uacute", new Character('\u00da')); // latin capital letter U with acute, U+00DA ISOlat1
        map.put("Ucirc", new Character('\u00db')); // latin capital letter U with circumflex, U+00DB ISOlat1
        map.put("Uuml", new Character('\u00dc')); // latin capital letter U with diaeresis, U+00DC ISOlat1
        map.put("Yacute", new Character('\u00dd')); // latin capital letter Y with acute, U+00DD ISOlat1
        map.put("THORN", new Character('\u00de')); // latin capital letter THORN, U+00DE ISOlat1
        map.put("szlig", new Character('\u00df')); // latin small letter sharp s = ess-zed, U+00DF ISOlat1
        map.put("agrave", new Character('\u00e0')); // latin small letter a with grave = latin small letter a grave, U+00E0 ISOlat1
        map.put("aacute", new Character('\u00e1')); // latin small letter a with acute, U+00E1 ISOlat1
        map.put("acirc", new Character('\u00e2')); // latin small letter a with circumflex, U+00E2 ISOlat1
        map.put("atilde", new Character('\u00e3')); // latin small letter a with tilde, U+00E3 ISOlat1
        map.put("auml", new Character('\u00e4')); // latin small letter a with diaeresis, U+00E4 ISOlat1
        map.put("aring", new Character('\u00e5')); // latin small letter a with ring above = latin small letter a ring, U+00E5 ISOlat1
        map.put("aelig", new Character('\u00e6')); // latin small letter ae = latin small ligature ae, U+00E6 ISOlat1
        map.put("ccedil", new Character('\u00e7')); // latin small letter c with cedilla, U+00E7 ISOlat1
        map.put("egrave", new Character('\u00e8')); // latin small letter e with grave, U+00E8 ISOlat1
        map.put("eacute", new Character('\u00e9')); // latin small letter e with acute, U+00E9 ISOlat1
        map.put("ecirc", new Character('\u00ea')); // latin small letter e with circumflex, U+00EA ISOlat1
        map.put("euml", new Character('\u00eb')); // latin small letter e with diaeresis, U+00EB ISOlat1
        map.put("igrave", new Character('\u00ec')); // latin small letter i with grave, U+00EC ISOlat1
        map.put("iacute", new Character('\u00ed')); // latin small letter i with acute, U+00ED ISOlat1
        map.put("icirc", new Character('\u00ee')); // latin small letter i with circumflex, U+00EE ISOlat1
        map.put("iuml", new Character('\u00ef')); // latin small letter i with diaeresis, U+00EF ISOlat1
        map.put("eth", new Character('\u00f0')); // latin small letter eth, U+00F0 ISOlat1

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -