Feature #34718
Auto guess file encoding when importing CSV file
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 0% | ||
Category: | Importers | |||
Target version: | 5.0.0 | |||
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
.
Associated revisions
Auto guess file encoding when importing CSV file (#34718).
Patch by Go MAEDA.
RuboCop: fix Style/RedundantSort in app/models/import.rb (#34718).
Fix wrong variable name in Import#set_default_settings (#34718).
History
#1
Updated by Go MAEDA 6 months ago
- File 34718.patch
added
- Target version set to Candidate for next major release
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.
#2
Updated by Mizuki ISHIKAWA 6 months ago
+1