# Use of Æ, Ø and Å in system.perspective.download

**URL:** <https://forum.inductiveautomation.com/t/use-of-ae-o-and-a-in-system-perspective-download/116527>\
**Category:** Ignition\
**Tags:** scripting, perspective\
**Created:** [July 24, 2026, 9:40am UTC](https://forum.inductiveautomation.com/t/use-of-ae-o-and-a-in-system-perspective-download/116527 "2026-07-24T09:40:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hans\_Olav\_Ronning](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hans_olav_ronning/32/44018_2.png) [@Hans\_Olav\_Ronning](https://forum.inductiveautomation.com/u/Hans_Olav_Ronning)\
**Post date:** [July 24, 2026, 9:40am UTC](https://forum.inductiveautomation.com/t/use-of-ae-o-and-a-in-system-perspective-download/116527/1 "2026-07-24T09:40:29Z")

</div>

I'm using a script for saving and storing the Alarm Journal to a file. The alarm journal contains the Norwegian letters æ, ø and å. I'm using the system.perspective.download-function to save the file, but I'm not able to force it to store these characters in the file.

The system.perspective.print-function prints these characters fine in the Output Console, so my guess is that the problem is in the system.perspective.download-function. I've tried both the system.dataset.toCSV and .toExcel-conversions before downloading the file. I have also opened both types of files in both Excel and in Notepad++ without any luck.

I've also experimented with the contentType in the download function, but also here without success.

* * *

Segment from script:

dataz = system.dataset.toDataSet(header,table)  
csvData = system.dataset.toCSV(dataset=dataz)

system.perspective.print(csvData)

system.perspective.download(filename="Label.xls", data=csvData, contentType="text/plain; charset=utf-8")

* * *

I'm surely not the first one experiencing this, so I'm wondering if there are anyone out there who can point me in the correct direction?

---

<div class="post-metadata">

**Author:** ![djhammett77](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@djhammett77](https://forum.inductiveautomation.com/u/djhammett77)\
**Post date:** [July 24, 2026, 5:26pm UTC](https://forum.inductiveautomation.com/t/use-of-ae-o-and-a-in-system-perspective-download/116527/2 "2026-07-24T17:26:29Z")

</div>

I have no direct experience, but I suspect that there may be some misalignment between your data and filetype causing the issues rather than Ignition's download function itself. Ultimately, .xls is a legacy Excel binary file extension which may not properly encode plaintext CSV data with such characters. Unless you explicitly need that filetype to interface with some legacy software (pre-2003 ish), I would suggest trying either

1. Use system.dataset.toExcel to obtain data and save with file extension '.xlsx'
2. Keep using system.dataset.toCSV and save with file extension '.csv'
  - You may also want to add a UTF-8 BOM to the beginning of your CSV data if you're ultimately planning to open this in Excel since Windows applications are known to interact strangely with non-ASCII plaintext coming from the input text stream unless given explicit instructions.
    - Example: csvData = u'\ufeff' + system.dataset.toCSV(dataz)

I'm mostly commenting because I'm interested to hear how this turns out, actually. Best of luck!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 27, 2026, 7:16pm UTC](https://forum.inductiveautomation.com/t/use-of-ae-o-and-a-in-system-perspective-download/116527/3 "2026-07-27T19:16:15Z")

</div>

Do you have a reverse proxy or anything in front of Ignition?  
When you provide the content to download as a string, we're explicitly writing it out with UTF-8:

```java
if (data instanceof String) {
  OutputStreamWriter writer =
      new OutputStreamWriter(response.getOutputStream(), UTF_8);
  writer.write((String) data);

```

If you want to make absolutely sure the download function isn't mangling the encoding somehow, you could try converting your string into a raw byte array to pass into download; either of these two should work:

```python
from java.lang import String
bytes = String("abc").getBytes("UTF-8")

from org.apache.commons.lang3 import StringUtils
bytes = StringUtils.getBytes("abc", "UTF-8")

```

A byte array provided to `system.perspective.download` will be emitted verbatim.

---

<div class="post-metadata">

**Author:** ![lane.duncan](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lane.duncan/32/83700_2.png) [@lane.duncan](https://forum.inductiveautomation.com/u/lane.duncan)\
**Post date:** [July 28, 2026, 9:40am UTC](https://forum.inductiveautomation.com/t/use-of-ae-o-and-a-in-system-perspective-download/116527/4 "2026-07-28T09:40:15Z")

</div>

I tested this with a 3rd party Excel module I'm working on, and I can confirm this is an issue.

I tested with this code:

```python
		headers = ["Language", "Sample"]

		data = [
		    ["Norwegian", "Jeg har lyst på blåbær og røkt ørret på hytta i Ålesund."],
		    ["German", "Mädchen können übermäßig süße Brötchen mögen, während schöne Vögel über die Straße fliegen."],
		    ["France", "Le pêcheur préféré a déjà rêvé d'être à côté de l'île où il était né."]
		]

		dataz = system.dataset.toDataset(headers, data)
		
		system.tag.writeBlocking(["[default]Tag0"], dataz, 1000)
		
		csvData = system.dataset.toCSV(dataset=dataz)
		
		system.perspective.download(filename="utc_test.txt", data=csvData, contentType="text/plain; charset=utf-8")
		
		from java.lang import String
		bytes = String(csvData).getBytes("UTF-8")
		system.perspective.download(filename="utc_test_bytes.txt", data=bytes)

```

I can confirm that the data written to the dataset tag is not correct, as is the data written to the two text files. My 3rd party module also was corrupt.

I asked Claude about the two text files, this was the final response after a few questions:

> So to directly answer your question: **yes, this file has the identical issue** as the first one — same single UTF-8-decoded-as-Latin-1 mojibake, same fix, and I've included the BOM this time so it should open correctly in Notepad++ without any extra steps.

Then I asked Claude about my Excel file generated from my 3rd party module, this was the response:

> Yes, same issue — but notable because it's happening in a different way this time. An .xlsx file's text is stored internally as proper UTF-8 XML, so there's no encoding-detection ambiguity like in a plain text file. This means the mojibake was **baked directly into the cell values themselves** — someone (or some tool) pasted or imported already-corrupted text into the spreadsheet, rather than the file being mis-read on open.

It appears that the issue lies within the creation of the dataset.

Interesting enough is Claude was easily able to fix the text files.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 28, 2026, 10:58am UTC](https://forum.inductiveautomation.com/t/use-of-ae-o-and-a-in-system-perspective-download/116527/5 "2026-07-28T10:58:15Z")

</div>

> [@lane.duncan](#):
>
> ```python
> data = [
> ["Norwegian", "Jeg har lyst på blåbær og røkt ørret på hytta i Ålesund."],
> ["German", "Mädchen können übermäßig süße Brötchen mögen, während schöne Vögel über die Straße fliegen."],
> ["France", "Le pêcheur préféré a déjà rêvé d'être à côté de l'île où il était né."]
> ]
> 
> ```

You have constant strings in python with special characters, but without the `u'...'` syntax. Your special characters in this test are breaking right here, not in the export tools.

GIGO.

Jython strings containing unicode **must** use the prefix.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 28, 2026, 4:12pm UTC](https://forum.inductiveautomation.com/t/use-of-ae-o-and-a-in-system-perspective-download/116527/6 "2026-07-28T16:12:28Z")

</div>

And indeed, making that change everything works as expected, even in the dead simple case:

```python
def runAction(self, event):
	headers = ["Language", "Sample"]

	data = [
	    ["Norwegian", u"Jeg har lyst på blåbær og røkt ørret på hytta i Ålesund."],
	    ["German", u"Mädchen können übermäßig süße Brötchen mögen, während schöne Vögel über die Straße fliegen."],
	    ["France", u"Le pêcheur préféré a déjà rêvé d'être à côté de l'île où il était né."]
	]

	dataz = system.dataset.toDataSet(headers, data)
	csvData = system.dataset.toCSV(dataset=dataz)
	
	system.perspective.download(filename="basic.txt", data=csvData)
	system.perspective.download(filename="utc_test.txt", data=csvData, contentType="text/plain; charset=utf-8")
	
	from java.lang import String
	bytes = String(csvData).getBytes("UTF-8")
	system.perspective.download(filename="utc_test_bytes.txt", data=bytes)

```

---

<div class="post-metadata">

**Author:** ![Hans\_Olav\_Ronning](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hans_olav_ronning/32/44018_2.png) [@Hans\_Olav\_Ronning](https://forum.inductiveautomation.com/u/Hans_Olav_Ronning)\
**Post date:** [August 17, 2026, 6:16am UTC](https://forum.inductiveautomation.com/t/use-of-ae-o-and-a-in-system-perspective-download/116527/7 "2026-08-17T06:16:01Z")

</div>

Thx for all the responses 🙂 I have been on a long vacation not being able to follow up on this.

I'll look forward to test your suggestions 👍
