[reportlab-users] Missing Unicode support in validators

Dinu Gherman reportlab-users@reportlab.com
Fri, 3 Oct 2003 17:03:20 +0200


I wrote:

> I've found that _isString() in lib/validators.py isn't yet aware of
> Unicode... But if I replace the relevant bits with the following,
> I can happily produce Tibetian texts in RL-Drawings again... ;-)
>
> Regards,
>
> Dinu
>
> ...
> from types import FloatType, IntType, ListType, TupleType, \
>     StringType, UnicodeType
> ...
> class _isString(Validator):
>     def test(self,x):
>         return type(x) in (StringType, UnicodeType)
> ...

Any comments on this one?

Dinu

--
Dinu C. Gherman
......................................................................
"An error is not a mistake until you refuse to correct it."
(Werner Heisenberg)