def charcode(self, code="<STR_LIT>"):
if code.upper() == "<STR_LIT>":<EOL><INDENT>self.magic.force_encoding(False)<EOL><DEDENT>else:<EOL><INDENT>self.magic.force_encoding(code)<EOL><DEDENT>
Set Character Code Table

        Sets the control sequence from ``CHARCODE`` in :py:mod:`escpos.constants` as active. It will be sent with
        the next text sequence. If you set the variable code to ``AUTO`` it will try to automatically guess the
        right codepage. (This is the standard behaviour.)

        :param code: Name of CharCode
        :raises: :py:exc:`~escpos.exceptions.CharCodeError`