Is there an invisible character that is not regarded as whitespace?

Try Unicode Character ‘ZERO WIDTH SPACE’ (U+200B). It is not a Whitespace according to WP: Whitespace#Unicode

The code of StringUtils.isBlank will not bother it:

public static boolean isBlank(String str) {
int strLen;
if (str == null || (strLen = str.length()) == 0) {
          return true;
     }
for (int i = 0; i < strLen; i++) {
     if ((Character.isWhitespace(str.charAt(i)) == false)) {
                   return false;
                }
         }
 return true;
  }

Leave a Comment