Will be invoked for character(s) that could not otherwise be processed by the sequencer

@internal
546710
public function onFallback($chars)
    {
        // check if there's any special key binding for any of the chars
        $buffer = '';
        foreach ($this->strsplit($chars) as $char) {
            if ($this->listeners($char)) {
                // special key binding for this character found
                // process all characters before this one before invoking function
                if ($buffer !== '') {
                    $this->addInput($buffer);
                    $buffer = '';
                }
                $this->emit($char, array($char));
            } else {
                $buffer .= $char;
            }
        }

        // process remaining input characters after last special key binding
        if ($buffer !== '') {
            $this->addInput($buffer);
        }
    }
352090
public function asCharacterString(): Primitive\CharacterString
    {
        if (!$this->_element instanceof Primitive\CharacterString) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_CHARACTER_STRING));
        }
        return $this->_element;
    }
663926
def _escape_sequence(self, char):
        

        num = ord(char)
        if char == "[":
            self.state = "escape-lb"
        elif char == "(":
            self.state = "charset-g0"
        elif char == ")":
            self.state = "charset-g1"
        elif num in self.escape:
            self.dispatch(self.escape[num])
            self.state = "stream"
        elif self.fail_on_unknown_esc:
            raise StreamProcessError("Unexpected character '%c' == '0x%02x'" % (char, ord(char)))
5687
function handlePlainCharacter(element, char) {
  const prefix = element[typedPrefixKey] || '';
  element[typedPrefixKey] = prefix + char;
  element.selectItemWithTextPrefix(element[typedPrefixKey]);
  setPrefixTimeout(element);
}
774010
public static function codePointAt($chars, int $index, int $limit = null): int
    {
        if (\is_array($chars) === false && ($chars instanceof CharSequence) === false) {
            throw new InvalidArgumentException('Only char arrays and sequences can be processed!');
        }

        // Validate char array
        if (\is_array($chars)) {
            $test = reset($chars);

            if ($test === false || ($test instanceof static) === false) {
                throw new InvalidArgumentException('Array must contain char elements!');
            }
        }

        // Validate specified index
        if ($index < 0) {
            throw new InvalidArgumentException('Index cannot be negative!');
        }

        // Validate length
        if ($limit !== null) {
            if ($limit < 0 || $index >= $limit) {
                throw new InvalidArgumentException('Limit cannot be negative and index must be lower than specified limit!');
            }

            $length = \is_array($chars) ? count($chars) : $chars->length();

            if ($limit > $length) {
                throw new InvalidArgumentException('Limit cannot be greater than char array/sequence!');
            }
        }

        $char       = \is_array($chars) ? $chars[$index] : $chars->charAt($index);
        $stringChar = (string) $char;

        return mb_ord($stringChar, mb_detect_encoding($stringChar));
    }
773628
private void nextChar() {
        if (pos < line.length()) {
            c = line.charAt(pos);
            pos++;
        } else {
            c = '\n';
        }
    }
1167345
public int scanChar() throws IOException {

	// load more characters, if needed
	if (fCurrentEntity.position == fCurrentEntity.count) {
	    load(0, true);
	}

	// scan character
	int c = fCurrentEntity.ch[fCurrentEntity.position++];
	boolean external = false;
	if (c == '\n' ||
	    (c == '\r' && (external = fCurrentEntity.isExternal()))) {
	    fCurrentEntity.lineNumber++;
	    fCurrentEntity.columnNumber = 1;
	    if (fCurrentEntity.position == fCurrentEntity.count) {
		fCurrentEntity.ch[0] = (char)c;
		load(1, false);
	    }
	    if (c == '\r' && external) {
		if (fCurrentEntity.ch[fCurrentEntity.position++] != '\n') {
		    fCurrentEntity.position--;
		}
		c = '\n';
	    }
	}

	// return character that was scanned
	fCurrentEntity.columnNumber++;
	return c;
	
    }
37801
function isUnreserved (chr) {
        return charHelper.isAlpha(chr) || charHelper.isDigit(chr) || chr === '-' || chr === '.' || chr === '_' || chr === '~';
    }
1117356
protected function handleCharacter34()
    {
        //Unescaped double quote
        if (!$this->inSingleQuotes && $this->lastCharacter != 92) {
            $this->inQuotes = !$this->inQuotes;
        }

        return true;
    }
958660
protected function inAtRuleStringState()
    {
        $char = $this->getCurrentChar();

        if ($char === self::CHAR_DOUBLEQUOTE && $this->isEscaping() === false) {
            $this->cleanBuffer();
            $this->setState(self::IN_ATRULE);
        } elseif ($char === self::CHAR_ESCAPE) {
            $this->bufferize($char);
        } else {
            $this->cleanBuffer();
        }

        $this->output($char);
    }
1245316
def _end_escape_sequence(self, char):
        

        num = ord(char)
        if num in self.sequence:
            self.dispatch(self.sequence[num], *self.params)
        self.state = "stream"
        self.current_param = ""
        self.params = []
202090
public function checkChars($value)
    {
        if (strlen($value) != 8) {
            if (strpos($value, 'X') !== false) {
                return false;
            }
        }

        return parent::checkChars($value);
    }
1301114
function (char, chars) {
                var
                    first,
                    last;
                if ("^" === char) {
                    this._exc = [];
                } else if ("]" === char) {
                    if (this._inRange) {
                        gpf.Error.patternInvalidSyntax();
                    }
                    return true;
                } else if ("-" === char) {
                    if (this._inRange || 0 === chars.length) {
                        gpf.Error.patternInvalidSyntax();
                    }
                    this._inRange = true;
                } else {
                    if (this._inRange) {
                        first = chars[chars.length - 1].charCodeAt(0);
                        last = char.charCodeAt(0);
                        while (--last > first) {
                            chars.push(String.fromCharCode(last));
                        }
                        chars.push(char);
                        delete this._inRange;
                    } else {
                        // First char of a range
                        chars.push(char);
                    }
                }
                return false;
            }
408454
@Override
    public void characters(char[] ch, int start, int length) throws SAXException {

        // <param-name>
        if (elements("web-app", "context-param", "param-name")) {
            currentName = String.valueOf(ch, start, length).trim();
        }

        // <param-value>
        if (elements("web-app", "context-param", "param-value")) {
            currentValue = String.valueOf(ch, start, length).trim();
        }

    }
74383
public function performCheck()
    {
        try {
            list($charset, $collation) = $this->characterSetCollationResolver->resolveCharacterSetAndCollation($this->connection);
        } catch (NoCharacterSetCollationDefinedException $x) {
            return new PreconditionResult(PreconditionResult::STATE_SKIPPED, t('preferred database character set and collation are not configured.'));
        } catch (CharacterSetCollationException $x) {
            if ($x instanceof LongKeysUnsupportedByCollation && $x->getCollation() === 'utf8mb4_unicode_ci' && $x->getWantedKeyLength() === 255) {
                // Let's simplify a bit the error message for the default concrete5 values
                // If users customize these values, let's keep the original (complex) message (assuming that they know what they are doing)
                return new PreconditionResult(PreconditionResult::STATE_FAILED,
                    t('The database does have a complete support for all the Unicode characters.')
                    . ' ' . t("This implies, for example, that you may not be able to save emoticons (it's the same behavior as concrete5 versions older than 8.5.0).")
                    . ' ' . t('You should upgrade your database to fix this issue.')
                );
            }

            return new PreconditionResult(PreconditionResult::STATE_FAILED, $x->getMessage());
        } catch (Exception $x) {
            return new PreconditionResult(PreconditionResult::STATE_SKIPPED, $x->getMessage());
        }

        return new PreconditionResult(PreconditionResult::STATE_PASSED, t('The database supports the "%1$s" character set and the "%2$s" collation.', $charset, $collation));
    }
1229306
def charlock_detect(str)
      if defined? CharlockHolmes::EncodingDetector
        if detected = CharlockHolmes::EncodingDetector.detect(str)
          str.force_encoding(detected[:encoding]) if detected[:encoding]
        end
      end

      str
    end
156256
public void characters(char ch[], int start, int length)
    {
        if (m_CurrentString == null)
            m_CurrentString = new String(ch, start, length);
        else
            m_CurrentString += new String(ch, start, length);
    }