#113 UnicodeDecodeError with non-ASCII character in file name

closed-fixed
None
5
2009-09-10
2009-04-26
No

rst2html some.txt some.html

yields
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

input file is utf-8 encoded

Discussion

  • John Francis Lee

    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

     
  • David Goodger

    David Goodger - 2009-04-26

    The problem is a non-ASCII character in the file name.

    There's a markup error in the input file, which Docutils is trying to report ("<filename>:208: (ERROR/3) Unexpected indentation.") The observed UnicodeDecodeError exception is caused by a problem encoding the file name itself.

    As a workaround, please rename the file; remove any non-ASCII characters from the file name.

     
  • David Goodger

    David Goodger - 2009-04-26
    • labels: 369283 -->
    • milestone: 156138 -->
    • assigned_to: nobody --> goodger
     
  • John Francis Lee

    The immediate cause of failure was rst2html's inability to deal with files with utf-8 encoded unicode names.

    The secondary cause of failure was an indentation error.

    The work-around is not to have files with utf-8 encoded unicode names.

    And to use correct indentation syntax with reStructuredText files.

     
  • Günter Milde

    Günter Milde - 2009-09-03
    • summary: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in --> UnicodeDecodeError with non-ASCII character in file name
     
  • Günter Milde

    Günter Milde - 2009-09-10

    Fixed in SVN (upcoming release 0.6)

     
  • Günter Milde

    Günter Milde - 2009-09-10
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks