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?

有帮助吗?

解决方案

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
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top