Making isValidTextString deal better with the passed range.
On Python 3.3, unicode strings starting with u'str' is accepted again (grammar 3.x fixed).