Skip to content

Chilkat Tech Notes

Chilkat Software Tech Notes

    May 17, 2011

    (Python) Using strings returned from sqlite3

    In  the Python programming language, the strings returned from sqlite3 are unicode, not 8-bit strings.

    Chilkat API methods with string arguments expect either ANSI or utf-8 8-bit strings.  See these Python examples:

    http://www.example-code.com/python/python-source-file-encoding.asp

    http://www.example-code.com/python/python-charset.asp

    A unicode string returned from sqlite3 must be converted to an 8-bit string by using “str”, as shown below:

    ...
    email.put_Subject(str(unicodeStr))
    ...
    admin
    0
    Tags :
    Python

    Post navigation

    Mapped network drives are specific to the user account that created them
    Using chilkat.SYSTEMTIME in Python

    Blogroll

    • * Release Notes
    • Chilkat Binary Encodings
    • Chilkat Character Encodings
    • Chilkat Home
    • Example Code
    • Generate Chilkat Code from Postman
    • How to Determine FTP Connection Settings
    • How To Register ActiveX DLLs
    • MSVC Runtimes for .NET Assemblies
    • Never Handle Non-Text Binary Data as a String
    • Online XML Signature Validators
    • Reference Documentation
    • SOAP WSDL to Chilkat Code
    • Socket Programming Must-Know Concepts
    • StackOverflow (Chilkat Software)

    Tags

    ActiveX asp async asynchronous C# callbacks Delphi email Encryption error messages events exchange server FTP GMail HTTP IMAP IOS Java Linking MIME oauth2 Office365 pfx PHP pop3 port-forwarding regsvr32 release notes RSA SFTP smartcard SMTP socket SSH SSL TLS tunnel upload vb6 VBScript VC++ x64 xades XML zip

      Copyright ©2025 Chilkat Tech Notes . All rights reserved. Powered by WordPress & Designed by Bizberg Themes