if (c == 0x1B) break;
if (c == 0x1B) return PR_FALSE;
static PRBool intl_is_legal_utf8(const char *input, unsigned len){  int c;  while (len) {    c = (unsigned char)*input++;    len--;    if (c == 0x1B) break;    if ((c & 0x80) == 0) continue;    if ((c & 0xE0) == 0xC0) {      if (len < 1 || (*input & 0xC0) != 0x80 ||        ((c & 0x1F)<<6) + (*input & 0x3f) < 0x80) {        return PR_FALSE;      }      input++;      len--;    } else if ((c & 0xF0) == 0xE0) {      if (len < 2 || (input[0] & 0xC0) != 0x80 ||        (input[1] & 0xC0) != 0x80) {        return PR_FALSE;      }      input += 2;      len -= 2;    } else if ((c & 0xF8) == 0xF0) {      if (len < 3 || (input[0] & 0xC0) != 0x80 ||        (input[1] & 0xC0) != 0x80 || (input[2] & 0xC0) != 0x80) {        return PR_FALSE;      }      input += 2;      len -= 2;    } else {      return PR_FALSE;    }  }  return PR_TRUE;}