Java String's trim() functions trims only white spaces defined in ASCII. Others are not trimmed. and when printing those characters in the string you will find value as 160. char c = str.charAt(0); int val = (int) c; System.out.println("The char:"+val+":"); output: The char:160: Unicode equivalent: \\u00A0 So we will need a unicode compatible method for trimming this. Some indicate a way to do it by using some google library : http://code.google.com/p/guava-libraries/ Custom Solution: boolean isWhiteSpace (String word) { if(word.replaceAll("\\u00A0","").length() < 1){ return true; } } And then you can decide on removing it from processing.