(self, cmd)
encoding ENCODING: Set the encoding used for new files opened via .output and imports

        SQLite and APSW work internally using Unicode and characters.
        Files however are a sequence of bytes.  An encoding describes
        how to convert between bytes and characters.  The default
        encoding is utf8 and that is generally the best value to use
        when other programs give you a choice.

        You can also specify an error handler.  For example
        'cp437:replace' will use code page 437 and any Unicode
        codepoints not present in cp437 will be replaced (typically
        with something like a question mark).  Other error handlers
        include 'ignore', 'strict' (default) and 'xmlcharrefreplace'.

        For the default input/output/error streams on startup the
        shell defers to Python's detection of encoding.  For example
        on Windows it asks what code page is in use and on Unix it
        looks at the LC_CTYPE environment variable.  You can set the
        PYTHONIOENCODING environment variable to override this
        detection.

        This command affects files opened after setting the encoding
        as well as imports.

        See the online APSW documentation for more details.
encoding ENCODING: Set the encoding used for new files opened via .output and imports
encoding ENCODING : Set the encoding used for new files opened via . output and imports
def command_encoding(self, cmd):
        """encoding ENCODING: Set the encoding used for new files opened via .output and imports

        SQLite and APSW work internally using Unicode and characters.
        Files however are a sequence of bytes.  An encoding describes
        how to convert between bytes and characters.  The default
        encoding is utf8 and that is generally the best value to use
        when other programs give you a choice.

        You can also specify an error handler.  For example
        'cp437:replace' will use code page 437 and any Unicode
        codepoints not present in cp437 will be replaced (typically
        with something like a question mark).  Other error handlers
        include 'ignore', 'strict' (default) and 'xmlcharrefreplace'.

        For the default input/output/error streams on startup the
        shell defers to Python's detection of encoding.  For example
        on Windows it asks what code page is in use and on Unix it
        looks at the LC_CTYPE environment variable.  You can set the
        PYTHONIOENCODING environment variable to override this
        detection.

        This command affects files opened after setting the encoding
        as well as imports.

        See the online APSW documentation for more details.
        """
        if len(cmd) != 1:
            raise self.Error("Encoding takes one argument")
        self.set_encoding(cmd[0])
def command_encoding ( self , cmd ) : if len ( cmd ) != 1 : raise self . Error ( "Encoding takes one argument" ) self . set_encoding ( cmd [ 0 ] )