Tony Nelson wrote:
> I'd like to have a fast way to validate large amounts of string data as
> being UTF-8.
define "validate".
> I don't see a fast way to do it in Python, though:
>
> unicode(s,'utf-8').encode('utf-8)
if "validate" means "make sure the byte stream doesn't use invalid
sequences", a plain
unicode(s, "utf-8")
should be sufficient.
</F>