On Tue, Apr 7, 2009 at 10:44 AM, Pirritano, Matthew
<[email protected]> wrote:
> How can I find out the type of coding that was used to create this file?
> Is there a way to do this other than just asking the person who created
> it? That is possible, but I was just curious.
If you can look at the data as hex values it's pretty easy to
distinguish utf-8, utf-16be and utf-16le, which are the most likely
codings. In Python you could try
f = open('unicode_file.txt')
s = f.read(20)
print repr(s)
Kent
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor