Java String Normalize normalizeUnicodeDiacritics(String text)

Here you can find the source of normalizeUnicodeDiacritics(String text)

Description

normalize Unicode Diacritics

License

Open Source License

Declaration

public static String normalizeUnicodeDiacritics(String text) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.Normalizer;
import java.text.Normalizer.Form;

import java.util.regex.Pattern;

public class Main {
    public static String normalizeUnicodeDiacritics(String text) {
        text = Normalizer.normalize(text, Form.NFD);
        Pattern pattern = Pattern.compile("\\p{InCombiningDiacriticalMarks}+");
        text = pattern.matcher(text).replaceAll("");

        return text;
    }//from  w  ww.j av a2 s.  c om
}

Related

  1. normalizeToAlpha(String input)
  2. normalizeUnicode(CharSequence text)
  3. normalizeUnicode(final String str)
  4. normalizeUnicode(String input)
  5. normalizeUnicode(String str)
  6. normalizeWhitespace(final String str)
  7. normalizeWhiteSpace(String str)
  8. normalizeWidth(String text)
  9. normalizeWord(String word)