Special characters are garbled on CSV imported objects

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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, these characters are not taken into account, even when CSV file is saved with UTF-8 encoding.

  • An example attribute value that contains a special character after importing

Accent.PNG

  • 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 Insight versions


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 happens usually if the file is opened with some editors like MS Excel before uploading to Insight.

To verify the file encoding, you could check the source file in different editors like Sublime or via command line.

$ file -I kunde.csv
kunde.csv: application/csv; charset=utf-8


Solution

This comes down to the Editor and its support of UTF-8. Using another Editor ( i.e. Sublime or Google Sheets) and re-saving the file with the right encoding before uploading the file into Insight could fix the issue.

  • Please see CSV Import for other details when importing Insight 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.


Last modified on Jan 28, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.