For "find" 'ascii' unicodedecodeerror codec can't decode byte

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Andreas Bittel
    New Member
    • Jul 2010
    • 1

    For "find" 'ascii' unicodedecodeerror codec can't decode byte

    Dear Ladies and Sirs,

    I open a ascii-file with "open", which contains the character: "U+00E7" "ç" "c3 a7". This character is read in a line of the "FileConten t"-table. Then I search with "find" the string "SearchStri ng" in this line.

    I receive the following error:

    "UnicodeDecodeE rror: 'ascii' codec can't decode byte 0xe7 in position 29: ordinal not in range(128)"

    Code:
    (FileContent[Index].find(SearchString )<0)
    What does I have to do to remove this error?

    Tia

    Kind regards

    Andreas Bittel
Working...