It seems that running encoder.encode() on a latin1/latin9 string results in, yes a bloody UnicodeDecodeError. Decode error on .encode()... Really. This way the modification from non-unicode string to real unicode appears to work better.
pyfpdb/Charset.py