View Single Post
Old 03-01-2009, 12:54 PM   #118
elinares
Xtreme Quijote
elinares doesn't litterelinares doesn't litterelinares doesn't litter
 
elinares's Avatar
 
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
Quote:
Originally Posted by hybernation View Post
Thank you for this tool! Was wondering if you could offer an option in the PDF conversion to retain the "smartquotes" ( “ and ” ) instead of converting them all to plain ones ( " ) ?

thanks again
John
Class lrf.Utils holds toXMLText method as:

Code:
	public static String toXMLText(String app) {
		app=app.replace('\u000C', ' ');
		app=app.replace("’", "'");
		app=app.replace("'", "'");
		app=app.replace("‘", "'");
		app=app.replace("\"", """);
		app=app.replace("“", """);
		app=app.replace("”", """);
		app=app.replace(" & ", " & ");
		app=app.replace("<", "&lt;");
		app=app.replace(">", "&gt;");
		app=app.replace("’", "&apos;");
		app=app.replace("—", "-");
		app=app.replace("…", "...");
		app=app.replace("’", "&apos;");
		app=app.replace("Æ", "AE");
		app=app.replace("á", "&aacute;");
		app=app.replace("é", "&eacute;");
		app=app.replace("í", "&iacute;");
		app=app.replace("ó", "&oacute;");
		app=app.replace("ú", "&uacute;");
		app=app.replace("Á", "&Aacute;");
		app=app.replace("É", "&Eacute;");
		app=app.replace("Í", "&Iacute;");
		app=app.replace("Ó", "&Oacute;");
		app=app.replace("Ú", "&Uacute;");
		app=app.replace("ñ", "&ntilde;");
		app=app.replace("Ñ", "&Ntilde;");
		return app;
	}
How must be? app is a String holding raw UTF-8 text.
elinares is offline   Reply With Quote