プロジェクト

全般

プロフィール

Vote #81260

完了

Auto guess file encoding when importing CSV file

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Importers_15
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
15
version_id:
155
issue_org_id:
34718
author_id:
332
assigned_to_id:
332
comments:
4
status_id:
5
tracker_id:
2
plus1:
1
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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@.


journals

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.
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
Setting the target version to 5.0.0.
--------------------------------------------------------------------------------
Committed the patch.
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリImporters_15 にセット
  • 対象バージョン5.0.0_155 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0