On 2 Feb 2006 08:03:14 -0800, rumours say that "Tim N. van der Leeuw" <[EMAIL PROTECTED]> might have written:
>So now what I need to know is, how do I find out in what encoding a >particular filename is? Is there a portable way for doing this? You said the filename comes as data, and not as contents of os.listdir(), right? You can only know (for almost certain) what encoding is *not* the filename (by looping over encodings and marking those where .decode fails). If it was textual data, you could be more successful in guessing (btw, it's been a long time since I requested example texts from various encodings for my encoding-guessing app, but I was sent only one) by testing characters in pairs and their frequencies. -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list