Skip to content
Snippets Groups Projects
Commit cd036602 authored by David Gobbi's avatar David Gobbi
Browse files

Don't restrict wrapped char to ASCII values

Previously, if a VTK methods returned a 'char' value that with an
extended (non-ASCII) value, the Python wrappers would raise an
exception:

    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0

Likewise, passing a Python str of length 1 to a VTK method as a 'char'
would give an error if the unicode value was > 127:

    TypeError: InsertNextValue argument 1: a string of length 1 is required

(Note: this should be a ValueError exception rather than TypeError.)

The new code allows unicode values in the range [0,255] to be passed and
returned with the Python wrappers.
parent b5cd1ff5
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment