
nl.siegmann.epublib.bookprocessor.HTMLNameToHTMLNumberFixer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of epublib-tools Show documentation
Show all versions of epublib-tools Show documentation
A java library for reading/writing/manipulating epub files
The newest version!
package nl.siegmann.epublib.bookprocessor;
/**
*
* @author pieter
*/
public class HTMLNameToHTMLNumberFixer {
private static String[][] names = {
{" ", " "},
{"¡", "¡"},
{"¢", "¢"},
{"£", "£"},
{"¤", "¤"},
{"¥", "¥"},
{"¦", "¦"},
{"§", "§"},
{"¨", "¨"},
{"©", "©"},
{"ª", "ª"},
{"«", "«"},
{"¬", "¬"},
{"", ""},
{"®", "®"},
{"¯", "¯"},
{"°", "°"},
{"±", "±"},
{"²", "²"},
{"³", "³"},
{"´", "´"},
{"µ", "µ"},
{"¶", "¶"},
{"·", "·"},
{"¸", "¸"},
{"¹", "¹"},
{"º", "º"},
{"»", "»"},
{"¼", "¼"},
{"½", "½"},
{"¾", "¾"},
{"¿", "¿"},
{"À", "À"},
{"Á", "Á"},
{"Â", "Â"},
{"Ã", "Ã"},
{"Ä", "Ä"},
{"Å", "Å"},
{"Æ", "Æ"},
{"Ç", "Ç"},
{"È", "È"},
{"É", "É"},
{"Ê", "Ê"},
{"Ë", "Ë"},
{"Ì", "Ì"},
{"Í", "Í"},
{"Î", "Î"},
{"Ï", "Ï"},
{"Ð", "Ð"},
{"Ñ", "Ñ"},
{"Ò", "Ò"},
{"Ó", "Ó"},
{"Ô", "Ô"},
{"Õ", "Õ"},
{"Ö", "Ö"},
{"×", "×"},
{"Ø", "Ø"},
{"Ù", "Ù"},
{"Ù", "Ú"},
{"Û", "Û"},
{"Ü", "Ü"},
{"Ý", "Ý"},
{"Þ", "Þ"},
{"ß", "ß"},
{"à", "à"},
{"á", "á"},
{"â", "â"},
{"ã", "ã"},
{"ä", "ä"},
{"å", "å"},
{"æ", "æ"},
{"ç", "ç"},
{"è", "è"},
{"é", "é"},
{"ê", "ê"},
{"ë", "ë"},
{"ì", "ì"},
{"í", "í"},
{"î", "î"},
{"ï", "ï"},
{"ð", "ð"},
{"ñ", "ñ"},
{"ò", "ò"},
{"ó", "ó"},
{"ô", "ô"},
{"õ", "õ"},
{"ö", "ö"},
{"÷", "÷"},
{"ø", "ø"},
{"ù", "ù"},
{"ú", "ú"},
{"û", "û"},
{"ü", "ü"},
{"ý", "ý"},
{"þ", "þ"},
{"ÿ", "ÿ"},
{"€", "€"}
};
public static String fix(String html) {
for (String[] name : names) {
html = html.replaceAll(name[0], name[1]);
}
return html;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy