public static boolean isUtfStartByte(byte b) {
    return (b & 0xC0) != 0x80;
  }
Checks if b is the first byte of a UTF-8 character.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFUtils.java