Skip to content

encoding error #2

@JeffFessler

Description

@JeffFessler

I made the .py file executable and then ran the following using Python 2.7.10 on a Mac:

./fdf2csv.py Test_Data.csv

which gave this error:

File "./fdf2csv.py", line 31 SyntaxError: Non-ASCII character '\xc3' in file ./fdf2csv.py on line 31, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

I tried editing the line 31:
fdf_list = re.sub("(þÿ|FEFF)", "", fdf)
by replacing it with
fdf_list = re.sub("FEFF", "", fdf)
and then it ran fine on the Test_Data but for my FDF file it produced no output.
So perhaps some more changes are needed?

Thanks for providing this potentially useful utility! I hope I can use it :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions