Check breaking character
http://www.unicode.org/reports/tr14/#Table1

@param chr
355245
function checkBreak(chr) {
  return (
    (B2.includes(chr) && 'B2') ||
    (BAI.includes(chr) && 'BAI') ||
    (SHY.includes(chr) && 'SHY') ||
    (BA.includes(chr) && 'BA') ||
    (BB.includes(chr) && 'BB') ||
    (BK.includes(chr) && 'BK')
  );
}
730627
public static boolean isLetter (char c)
    {
	// [84] Letter ::= BaseChar | Ideographic
	// [85] BaseChar ::= ... too much to repeat
	// [86] Ideographic ::= ... too much to repeat

	//
	// Optimize the typical case.
	//
	if (c >= 'a' && c <= 'z')
	    return true;
	if (c == '/')
	    return false;
	if (c >= 'A' && c <= 'Z')
	    return true;

	//
	// Since the tables are too ridiculous to use in code,
	// we're using the footnotes here to drive this test.
	//
	switch (Character.getType (c)) {
	    // app. B footnote says these are 'name start'
	    // chars' ...
	  case Character.LOWERCASE_LETTER:		// Ll
	  case Character.UPPERCASE_LETTER:		// Lu
	  case Character.OTHER_LETTER:			// Lo
	  case Character.TITLECASE_LETTER:		// Lt
	  case Character.LETTER_NUMBER:			// Nl

	    // OK, here we just have some exceptions to check...
	    return !isCompatibilityChar (c)
		    // per "5.14 of Unicode", rule out some combiners
		&& !(c >= 0x20dd && c <= 0x20e0);

	  default:
	    // check for some exceptions:  these are "alphabetic"
	    return ((c >= 0x02bb && c <=  0x02c1)
		    || c == 0x0559 || c == 0x06e5 || c == 0x06e6);
	}
    }
1009753
static boolean isSymbolChar(int ch) {
        int t = Character.getType(ch);
        return t == Character.MATH_SYMBOL || t == Character.CURRENCY_SYMBOL || t == Character.MODIFIER_SYMBOL || t == Character.OTHER_SYMBOL;
    }
380500
def isthaichar(ch: str) -> bool:
    
    ch_val = ord(ch)
    if ch_val >= 3584 and ch_val <= 3711:
        return True
    return False
783427
private void checkToken(String s) {
		for (int i = 0; i < s.length(); i++) {
			char ch = s.charAt(i);
			if (!TOKEN.get(ch)) {
				throw new IllegalArgumentException("Invalid token character '" + ch + "' in token \"" + s + "\"");
			}
		}
	}
330126
public void characters(char ch[], int start, int length) throws SAXException
   {
      try
      {
         importer.characters(ch, start, length);
      }
      catch (RepositoryException e)
      {
         throw new SAXException(e);
      }

   }
37801
function isUnreserved (chr) {
        return charHelper.isAlpha(chr) || charHelper.isDigit(chr) || chr === '-' || chr === '.' || chr === '_' || chr === '~';
    }
898352
public static boolean isCJK(String str, int beginIndex, int endIndex)
    {
        for ( int j = beginIndex; j < endIndex; j++ ) {
            if ( ! isCJKChar(str.charAt(j)) ) {
                return false;
            }
        }

        return true;
    }
1163522
@Override
  public int read(char[] chr) throws IOException {
    try {
      beforeRead(chr != null ? chr.length : 0);
      int n = in.read(chr);
      afterRead(n);
      return n;
    } catch (IOException e) {
      handleIOException(e);
      return -1;
    }
  }
1362135
public static boolean startsWithChar(String str, char ch) {
        if (StringUtils.isEmpty(str)) {
            return false;
        }

        return str.charAt(0) == ch;
    }
1207968
private boolean _readChar()
	{
		int endIndex = pos + 1;
		if( endIndex <= len )
		{
			_char = text.substring( pos, endIndex );
			pos++;
			return true;
		}
		pos = len;
		return false;
	}
1032136
@Override
    public void characters( char[] ch, int start, int length )
        throws SAXException
    {
        charBuffer.append( ch, start, length );
        charLineNumber = locator.getLineNumber();
    }
650240
public static boolean isValueCode(char ch)
    {
        return ch == '@'
                || ch == ':'
                || ch == '%'
                || ch == '+'
                || ch == '#'
                || ch == '<'
                || ch == '>'
                || ch == '*'
                || ch == '/'
                || ch == '!';
    }
403340
def _allowed_char(c):
    
    c = ord(c)
    if c < 0:
        return False
    if c < 128:
        return _ascii_allowed[c]
    # Genereally allow unicodes, TODO: check for unicode control characters
    # characters
    return True
475132
public static boolean isPunc(String str) {
    	if (str == null) return false;
    	str = str.trim();
    	
    	for (int i = 0; i < str.length(); ++i){
    		char c = str.charAt(i);
    		if (Character.isDigit(c) || Character.isLetter(c)){
    			return false;
    		}
    	}
		return true;
    }
1041991
function (chrs, buffer, pos, strict, opts) {
                        var isValid = opts.regex.val1.test(chrs);
                        if (!strict && !isValid) {
                            if (chrs.charAt(1) == opts.separator || "-./".indexOf(chrs.charAt(1)) != -1) {
                                isValid = opts.regex.val1.test("0" + chrs.charAt(0));
                                if (isValid) {
                                    buffer[pos - 1] = "0";
                                    return { "pos": pos, "c": chrs.charAt(0) };
                                }
                            }
                        }
                        return isValid;
                    }
1031671
@Override
    public void characters(final char[] chr, final int start, final int length) throws SAXException {

        final String text = new String(chr).substring(start, start + length);
        LOG.trace("characters; '{}'", text);
        final String trimmedText = text.trim();
        LOG.info("text: '{}'", trimmedText);
        this.textStack.push(trimmedText);
    }