code: private TokenType lexUtf8Char(Bytes jsonText, int curChar) {
          if (curChar <= 0x7f) {
              /* single byte */
              return STRING;
  
          } else if ((curChar >> 5) == 0x6) {
              /* two byte */
              if (jsonText.readRemaining() == 0) return EOF;
              curChar = readChar(jsonText);
              if ((curChar >> 6) == 0x2) return STRING;
  
          } else if ((curChar >> 4) == 0x0e) {
              /* three byte */
              if (jsonText.readRemaining() == 0) return EOF;
              curChar = readChar(jsonText);
              if ((curChar >> 6) == 0x2) {
                  if (jsonText.readRemaining() == 0) return EOF;
                  curChar = readChar(jsonText);
                  if ((curChar >> 6) == 0x2) return STRING;
              }
          } else if ((curChar >> 3) == 0x1e) {
              /* four byte */
              if (jsonText.readRemaining() == 0) return EOF;
              curChar = readChar(jsonText);
              if ((curChar >> 6) == 0x2) {
                  if (jsonText.readRemaining() == 0) return EOF;
                  curChar = readChar(jsonText);
                  if ((curChar >> 6) == 0x2) {
                      if (jsonText.readRemaining() == 0) return EOF;
                      curChar = readChar(jsonText);
                      if ((curChar >> 6) == 0x2) return STRING;
                  }
              }
          }
          return ERROR;
      }
docs: process a variable length utf8 encoded codepoint.
  
  @return
  STRING - if valid utf8 char was parsed and offset was advanced
  EOF - if end of input was hit before validation could complete
  ERROR - if invalid utf8 was encountered
  
  NOTE: on error the offset will point to the first char of the
  invalid utf8