Hey all, I'm trying to write something that will "fail fast" if one of my users gives me non-latin-1 characters. So I tried this:
>>> testString = "\x80" >>> foo = unicode(testString, "latin-1") >>> foo u'\x80' I would have thought that that should have raised an error, because \x80 is not a valid character in latin-1 (according to what I can find). Is this the expected behavior, or am I missing something? I'm on Windows, but I have explicitly set the character set to be latin-1 in sitecustomize.py >>> import sys >>> sys.getdefaultencoding() 'latin-1' -- http://mail.python.org/mailman/listinfo/python-list