ensuring valid latin-1

2006-11-29 Thread Chris Curvey
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

Re: ensuring valid latin-1

2006-11-29 Thread John Machin
Chris Curvey wrote: 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