[Schmitzm-commits] r823 - trunk/src/skrueger/i8n

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon May 3 10:07:57 CEST 2010


Author: alfonx
Date: 2010-05-03 10:07:56 +0200 (Mon, 03 May 2010)
New Revision: 823

Modified:
   trunk/src/skrueger/i8n/I8NUtil.java
Log:
Umlauteaustauschmethode auf utf8 inline erweitert

Modified: trunk/src/skrueger/i8n/I8NUtil.java
===================================================================
--- trunk/src/skrueger/i8n/I8NUtil.java	2010-05-02 19:00:12 UTC (rev 822)
+++ trunk/src/skrueger/i8n/I8NUtil.java	2010-05-03 08:07:56 UTC (rev 823)
@@ -174,12 +174,19 @@
 	/**
 	 * The German Umlaute have standard ASCII alternatives that are sometimes
 	 * use. This method will replace any possible ASCII-Umlaut Representation
-	 * into real Umlaute. E.g. "ae" to "ä" and "ue" to "ü"
+	 * into real Umlaute. E.g. "ae" to "ä" and "ue" to "ü". Umlaute are returned as inline-UTF8. 
 	 */
 	public static String mitUmlaute(String withoutUmlaute) {
-		String replaced = withoutUmlaute.replaceAll("ae", "ä");
-		replaced = replaced.replaceAll("ue", "ü");
-		replaced = replaced.replaceAll("oe", "ö");
+		String replaced = withoutUmlaute;
+		
+		replaced = replaced.replaceAll("ue", "\u00FC");
+		replaced = replaced.replaceAll("Ue", "\u00DC");
+		
+		replaced = replaced.replaceAll("oe", "\u00F6");
+		replaced = replaced.replaceAll("Oe", "\u00D6");
+		
+		replaced = replaced.replaceAll("ae", "\u00E4");
+		replaced = replaced.replaceAll("Ae", "\u00C4");
 		// TODO mehr
 		// TODO besser UTF \u123321 schreibweise
 		return replaced;



More information about the Schmitzm-commits mailing list