public static Object normalize(Object value, boolean shouldNormalize) {
        if (!shouldNormalize || !(value instanceof String)) {
            return value;
        }

        String strValue = (String) value;
        if (strValue.isEmpty()) {
            return Constants.EMPTY_STRING;
        }

        return DIACRITICS_PATTERN.matcher(java.text.Normalizer.normalize(strValue, java.text.Normalizer.Form.NFD)).replaceAll(Constants.EMPTY_STRING);
    }
Normalizes the given value by removing diacritics.

@param value the value to normalize, expected to be a String.
@param shouldNormalize whether to remove diacritics from the string.
@return the normalized string, or an empty string if the input is not a string or is empty.
primefaces/src/main/java/org/primefaces/util/LangUtils.java