However when the string contains an "Umlaut" it splits it there. Im pretty sure the problem is [A-Z] it seems im including the special charackters wrong, but how? 2. change the LANG environment variable to deDE.UTF-8 3. compile a java source file that includes german umlauts like "M-O,M-O,M-O".private static String name "Peter MM-Oller" You are at: Home » Java String not displaying German umlauts characters.How do I convert between ISO-8859-1 and UTF-8 in Java? Java convert Windows-1252 to UTF-8, some letters are wrong. Lets check out a draft JEP that would have Java use UTF-8 as the default charset.
final InputStreamReader reader new InputStreamReader(inputStream) final String encoding reader.getEncoding() I need a java function to convert umlaute in an existing html-String.Furthermore setting the UTF-8 encoding is not an option for me in this case. You will have to parse the html file first, and then apply escaping only on the relevant parts. Here is example code: public class Program . public static void main( String args) .Also, you can use Scanner which is provided by Java 5.0 to read UTF-8 file. java String UTF8.