Atul. skrev:

I wanted to know what encoding should I use to open the files with
Devanagari characters. I was thinking of UTF-8 but was not sure, any
leads on this? Anyone used it earlier?

Are we talking about existing files? If you don't know what encoding the files use, you could always try using the UTF-8 codec; it's very likely to complain if you're attempting to decode something that's isn't UTF-8.

If that doesn't work, it's a bit trickier -- there are several ways to encode Unicode, and then there's ISCII as well. If you cannot sort it out, try running this:

    >>> f = open("myfile.txt", "rb")
    >>> f.read(32)

on one of your files, and post the result, and chances are that someone will be able to identify the encoding.

</F>

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to