open file with non-ascii path

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ManWithNoName
    New Member
    • Aug 2007
    • 88

    open file with non-ascii path

    Hi all,

    I am trying to open a file that contains non-ascii characters in its file path,

    e.g. "c:\path\<n on-ascii>.file"

    I have found lots of information on the Internets
    - unicode()
    - # -*- coding: <encode type> -*-
    - encode()/decode()

    They correctly change characters to the output screen, but the "open()" function really don't give a ***, it just refuse to accept the changes???!!!

    What am I missing? This is driving me crazy (almost made me cry...)

    I run python 3.0 on Windows, and sys.getfilesyst emencoding() gives me "mbcs",

    Please help...
  • ManWithNoName
    New Member
    • Aug 2007
    • 88

    #2
    This is so embarrassing...

    I was giving the wrong path to the file... *blushes*

    It had nothing to do with encoding, but if anyone has a problem with that, have a look at: http://docs.python.org/dev/3.0/howto...code-filenames

    Still, I would blame it Python, really it should give more informative error messages...

    ... And be able to make coffee...

    You know what else would be nice, yes a bl---

    Comment

    Working...