Special Non-English Character Issue in downloaded csv files using system.perspective.download

Hello Team,
we are facing some issue when opening downloaded csv files (data read from SQL DB) using system.perspective.download that contain Non-English special characters.
The characters are not correctly denoted after the csv file is opened.
Need some solution or alternative suggestion on the issue.

Thank You

You need to figure out where the problem is: in the database or in the Ignition read and download.

When you look in the database directly is the encoding correct?

Which database type are you using?
What character encoding are you expecting?

In Database the characters are shown correctly also there is no error when we read into ignition using system.dataset.toCsv method , only issue occurs when we open that file in microsoft excel.
We require ANSI encoding. Currently it is UTF-8 encoding.

These two requirements are fundamentally incompatible. ANSI doesn’t have many (any?) non-english characters.

2 Likes

Is the file used elsewhere and you really need ANSI, or are you just opening it in Excel? If the latter, you’ll need to add a byte-order marker to the file:

csvData = u'\xef\xbb\xbf' + system.dataset.toCSV(dataset)
1 Like