Testing character files
Peter Wilkinson
pwilkinson at videotron.ca
Thu Sep 2 15:41:20 EDT 2004
I have been parsing character files that use ASCII and unicode (utf_16)
encoded.
I have written a script for converting unicode to ASCII given a directory.
I would like the script to test that a given file _is_ the in the 'utf_16'
format before attempting to read it, i.e. it should only convert those
files that are unicode.
Are there any built in methods, for testing a file encoding ?
Peter
More information about the Python-list
mailing list