Project

General

Profile

Actions

Defect #36377

closed

Encoding drop-down in the import settings defaults to US-ASCII instead of general_csv_encoding in Korean, Thai, and Shimplified Chinese

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

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

The "Encoding" drop-down is supposed to default to the encoding defined by general_csv_encoding in config/locales/*.yml files. For example, it should default to "ISO-8859-1" when the language of your account is English.

However, the drop-down always defaults to "US-ASCII" regardless of general_csv_encoding if the language of the current user is Korean (ko), Thai (th), or Simplified Chinese (zh).

This is because the value of general_csv_encoding in those languages is not found in Setting::ENCODINGS in app/models/setting.rb.

Language general_csv_encoding How to fix
Korean CP949 Add CP949 to Setting::ENCODINGS
Thai Windows-874 Add Windows-874 to Setting::ENCODINGS
Simplified Chinese gb18030 Change general_csv_encoding in zh.yml from gb18030 to GB18030


Files

wrong-default-encoding.png (102 KB) wrong-default-encoding.png Go MAEDA, 2022-01-01 08:26
36377.patch (2.69 KB) 36377.patch Go MAEDA, 2022-01-01 09:13
Actions #1

Updated by Go MAEDA about 2 years ago

  • File 36377.patch 36377.patch added
  • Subject changed from Encoding drop-down in the import settings defaults to US-ASCII instead of general_csv_encoding in some languages to Encoding drop-down in the import settings defaults to US-ASCII instead of general_csv_encoding in Korean, Thai, and Shimplified Chinese
  • Target version set to Candidate for next minor release

Here is a patch to fix the issue.

Actions #2

Updated by Go MAEDA about 2 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version changed from Candidate for next minor release to 5.0.0
  • Resolution set to Fixed

Fixed in r21335, r21336, r21337, and r21338

Actions

Also available in: Atom PDF