Domanda

Is there any good library that performs conversation of umlauts and special characters to their "flat" representation? Eg:

Ä -> AE
Ü -> UE
ß -> ss

Anything you could advise?

È stato utile?

Soluzione

use StringUtils, This is not the well-known apache library . That is solve your issue.

replaceUmlauts

public static java.lang.String replaceUmlauts(java.lang.String string)

Replaces all umlauts in a string.
Umlaut  Replacement
ä   ae
ö   oe
ü   ue
ß   ss

Parameters:
    string - String, where the umlauts has to be replaced 
Returns:
    String without umlauts
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top