Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#8410 closed enhancement (fixed)

[Patch] Change default encoding utf-8

Reported by: okamototk Owned by: farialima
Priority: normal Component: TicketImportPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12


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 jun66j5 6 years ago.
csv encoding patch based on r10028

Download all attachments as: .zip

Change History (6)

comment:1 Changed 6 years ago by farialima

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 6 years ago by anonymous

Configurable enccoding seems enough.

best regards,

Takashi Okamoto

comment:3 Changed 6 years ago by zziuni@…

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

Korean excel's cvs encoding is EUC-KR.

I tried editing in line 35line.

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

but, python 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 6 years ago by jun66j5

  • Summary changed from Change default encoding utf-8 to [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.


Changed 6 years ago by jun66j5

csv encoding patch based on r10028

comment:5 Changed 6 years ago by jun66j5

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

as closed The owner will remain farialima.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.