Fix Garbled Special Characters in CSV Imports for Assets in Jira DC
Platform Notice: Data Center Only - This article only applies to Atlassian apps on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When importing objects from CSV with special characters like umlauts, even when the CSV file is saved with UTF-8 encoding, these characters are not taken into account.
An example CSV file
Kunde,Gültig für Region,Gültig ab,Gültig bi ABC GmbH,A1,12/Nov/21,12/Nov/22
Environment
Editor (for example, MS Excel)
Any Jira Service Management Data Center version with Assets
Any pre-bundled Assets version
Diagnosis
By examining the insight_import.log of the time when the import was performed, we can see that the special characters were not recognized from the CSV file.
2021-11-12 14:08:48,889 [insight-InsightImportThreadGroup-worker-thread-1] | header:index: Kunde,G?ltig f?r
Region,G?ltig ab,G?ltig bis
2021-09-28 14:08:48,889 [insight-InsightImportThreadGroup-worker-thread-1] | <<< readDataToTable().
The CSV file has a different or invalid file encoding.
$ file -I kunde.csv
kunde.csv: text/plain; charset=unknown-8bit
Cause
The UTF-8 encoding has not been correctly applied to the CSV file. This usually happens if the file is opened with some editors (for example, MS Excel) before uploading to Assets.
To verify the file encoding, check the source file in different editors like Sublime or via the command line as follows:
$ file -I kunde.csv
kunde.csv: application/csv; charset=utf-8
Solution
This is down to the Editor and its support of UTF-8. Using another text editor and re-saving the file with the right encoding before uploading it into Assets will fix the issue.
Please see CSV Import for other details when importing Assets objects from CSV.
If you prefer to use only MS Excel, it's recommended to import the CSV file into Excel instead of opening it directly as it is.
Was this helpful?