Project

General

Profile

Actions

Feature #34718

closed

Auto guess file encoding when importing CSV file

Added by Go MAEDA about 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Importers
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

When importing a CSV file, file encoding is pre-selected according to general_csv_encoding in config/locales/*.yml. For example, "CP932" is selected by default when your language setting is Japanese.

I often use CSV files with UTF-8 encoding, but it's a bother to re-select UTF-8 in the encoding drop-down every time.

It would be nice if Redmine auto guesses the file encoding when importing a CSV file. Redmine already auto guess file encoding when displaying attached files or repository contents using Setting.repositories_encodings.


Files

34718.patch (4.27 KB) 34718.patch Go MAEDA, 2022-01-02 09:09
Actions #1

Updated by Go MAEDA over 2 years ago

Here is a patch to implement this feature.

The patch guesses the encoding of CSV files by checking if the encoding is one of Setting.repositories_encodings. It fallbacks to general_csv_encoding ff the auto-guess fails.

Actions #2

Updated by Mizuki ISHIKAWA over 2 years ago

+1

Actions #3

Updated by Go MAEDA over 2 years ago

  • Target version changed from Candidate for next major release to 5.0.0

Setting the target version to 5.0.0.

Actions #4

Updated by Go MAEDA over 2 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch.

Actions

Also available in: Atom PDF