protected function charCodeAt($index)
    {
        $body = $this->source->getBody();
        $char = mb_substr($body, $index, 1, 'UTF-8');

        if (mb_check_encoding($char, 'UTF-8')) {
            return hexdec(bin2hex(mb_convert_encoding($char, 'UTF-32BE', 'UTF-8')));
        } else {
            return NULL;
        }
    }