Product Documentation

FairCom SQL for Python

Previous Topic

Next Topic

ASCII Characters above 127

When using Python with extended ASCII characters (those with ASCII codes above 127), the default encoding in Python may result in errors trying to interpret FairCom DB SQL data.

The procedure below applies only to the Python driver. It is not necessary when using SQLAlchemy.

To properly display these characters, follow these steps:

  1. Locate these lines in the pyctsqlapi.py module:

    return str(s).encode()

    return s.decode()

  2. Change the two lines shown above to the following, respectively:

    return str(s).encode('ansi',errors = 'strict')

    return s.decode('ansi',errors = 'strict')

  3. Reinstall the module by executing the following:

    py setup.py install

Your c-tree data will be properly displayed.

TOCIndex