How do I convert string to upper case String.toUpperCase() ignoring special characters like
and all others. The problem is that it becomes   and browser does not recognize them as special HTML characters.
I came up with this but it does not cover all special characters:
public static String toUpperCaseIgnoreHtmlSymbols(String str){
if(str == null) return "";
str = str.trim();
str = str.replaceAll("(?i) "," ");
str = str.replaceAll(""",""");
str = str.replaceAll("&","&");
//etc.
str = str.toUpperCase();
return str;
}