Opened 16 years ago
Closed 14 years ago
#4458 closed defect (fixed)
UnicodeDecodeError
Reported by: | weltweitehrlich | Owned by: | François Granade |
---|---|---|---|
Priority: | normal | Component: | TicketImportPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
We have german umlauts. Importing a exported unmodified CSV generates:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 11: ordinal not in range(128)}}}
Attachments (1)
Change History (13)
comment:1 follow-ups: 2 4 Changed 16 years ago by
comment:2 Changed 16 years ago by
Replying to farialima:
Could you attach a CSV file that exposes the problem ?
Done.
Also, are you on Python 2.4, 2.5 or 2.6 ?
I'm using python 2.5
I think that an Excel spreadsheet would work - that's probably a workaround for you ?
I have no xlrd installation at the moment. I will test it later.
comment:3 follow-up: 6 Changed 16 years ago by
I met exactly same problem in Japanese(even use xlrd).
comment:4 follow-up: 5 Changed 16 years ago by
Replying to farialima:
I think that an Excel spreadsheet would work - that's probably a workaround for you ?
The Excel spreadsheet seems to work. You are right. The ticket export is CSV so it's not the best process to import using Excel. Can you fix it?
comment:5 follow-up: 7 Changed 16 years ago by
Replying to weltweitehrlich:
The ticket export is CSV so it's not the best process to import using Excel. Can you fix it?
I've committed a fix and updated the ".egg" files on the Wiki page. Please try it and tell me if it works for you.
comment:6 Changed 16 years ago by
Replying to giangnh@aureole-net.com.vn:
I met exactly same problem in Japanese(even use xlrd).
Could you attach a .csv file, and an .xls file, to this ticket, so that I can look at the problem ?
I don't think that the fix I just did will work for you: my fix supposes that the .csv file uses a European encoding. However, if you give me some sample files, I will try to fix it for Japanese also.
comment:7 Changed 16 years ago by
Replying to farialima:
Replying to weltweitehrlich:
The ticket export is CSV so it's not the best process to import using Excel. Can you fix it?
I've committed a fix and updated the ".egg" files on the Wiki page. Please try it and tell me if it works for you.
The error is gone. That's the good point. The bad one is that the encoding seems to be wrong. Maybe my fault. I must check this.
comment:9 follow-up: 11 Changed 14 years ago by
tried import of a Japanese file. csv format doesn't work, but Excel 2003 works fine with xlrd.
comment:10 Changed 14 years ago by
Problem still happening if the file has the character u\xea which translates to 'ê'
Other than that, it seems to be working.
comment:11 Changed 14 years ago by
Status: | new → assigned |
---|
Based on anonymous:
tried import of a Japanese file. csv format doesn't work, but Excel 2003 works fine with xlrd.
In #4458 I've added a warning:
"(Excel is preferred if your data contain non-ASCII characters). "
because there will be *always* issues with charsets in CSV - it does not support full Unicode.
I think we can mark this as fixed... anyone disagreeing can reopen it :)
comment:12 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
CSV files and non-ascii codecs are tricky. I thought that it was working, but it seems that it's not perfect.
Could you attach a CSV file that exposes the problem ? Also, are you on Python 2.4, 2.5 or 2.6 ?
I think that an Excel spreadsheet would work - that's probably a workaround for you ?