protected function compileCharacter($char)
    {
        switch (true) {
            case preg_match('(^U\\+[0-9a-fA-F]{4}$)', $char):
                return $this->converter->toUTF8Character(hexdec(substr($char, 2)));

            case preg_match('(^[0-9a-fA-F]{2}$)', $char):
                return chr(hexdec($char));

            default:
                throw new RuntimeException("Invalid character definition: $char");
        }
    }