Modify

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#8410 closed enhancement (fixed)

[Patch] Change default encoding utf-8

Reported by: okamototk Owned by: François Granade
Priority: normal Component: TicketImportPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

importticket plugin's default coding seems CP1252 when import CVS. Utf-8 is mroe generally and I would like to become it default. At least, it's cause character break in Japanese.

best regards,

Takashi Okamoto

Attachments (1)

support-csv-encoding.diff (18.4 KB) - added by Jun Omae 13 years ago.
csv encoding patch based on r10028

Download all attachments as: .zip

Change History (6)

comment:1 Changed 13 years ago by François Granade

I'm afraid that on European systems, the encoding for exporting CSVs from Excel is CP1252. I may be wrong, if anyone has an idea I would love input...

Should we make the encoding a configurable setting ?

comment:2 Changed 13 years ago by anonymous

Configurable enccoding seems enough.

best regards,

Takashi Okamoto

comment:3 Changed 13 years ago by zziuni@…

Hi. I'm Korean. I'm same trouble .

Korean excel's cvs encoding is EUC-KR.

I tried editing in readers.py line 35line.

value.decode('cp1252', 'replace') ==> value.decode('utf-8', 'replace')

but, python setup.py install is not installed.

.egg is installed. but, Trac UI is not Display in admin.

I need Ticketimport. how to install euc-kr or utf-8 (decode type changed) version ?

please help.

comment:4 Changed 13 years ago by Jun Omae

Summary: Change default encoding utf-8[Patch] Change default encoding utf-8

I worked the issue and attached the patch, support-csv-encoding.diff.

  • In importer page, users can select charset encoding of the csv file.
  • New [importer] csv_default_encoding option, the option is used as the default of encoding selector in importer page. If not set, utf-8.

Please apply it, if you can.

Thanks.

Changed 13 years ago by Jun Omae

Attachment: support-csv-encoding.diff added

csv encoding patch based on r10028

comment:5 Changed 13 years ago by Jun Omae

Resolution: fixed
Status: newclosed

(In [10049]) fixed #8410, support charset encoding of csv file to import

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain François Granade.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.