# How to get the Logic GET request to output correct encoding?

**URL:** <https://community.homey.app/t/how-to-get-the-logic-get-request-to-output-correct-encoding/129361>\
**Category:** Questions & Help\
**Created:** [January 31, 2025, 7:50am UTC](https://community.homey.app/t/how-to-get-the-logic-get-request-to-output-correct-encoding/129361 "2025-01-31T07:50:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Esben](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/esben/32/79405_2.png) [@Esben](https://community.homey.app/u/Esben)\
**Post date:** [January 31, 2025, 7:50am UTC](https://community.homey.app/t/how-to-get-the-logic-get-request-to-output-correct-encoding/129361/1 "2025-01-31T07:50:17Z")

</div>

Hi everyone

I am making a GET request to the Danish webpage [DOFbasen - af Dansk Ornitologisk Forening](https://dofbasen.dk/search/result.php?design=table&soeg=soeg&periode=antaldage&dage=7&omraade=lokal&lokal=584&artdata=art&hiddenart=08460&obstype=observationer&species=alle&sortering=dato)

This page of course has content with the Danish special characters: æ, ø and å (Æ, Ø and Å)

However, I am REALLY strugling with how to get Homey to understand that the output needs to be interpreted as charset=iso-8859-1 and not UTF-8.

No matter what I try (like adding _Accept-Charset: ISO-8859-1_ in the header or trying to use a javascript function to replace the special characters), the output in Homey always shows the Danish special characters as �.

I had come to the conclusion that it had to be an error in Homey that it always insists on interpreting the output as UTF-8, so I even reported it to Athom as a bug… And after 2 weeks I got a useless and arrogant response:

_While we’d love to assist you, we focus on general support and can’t dive into user-specific configurations._

_We’ll close this ticket, but we wish you all the best in finding the answer you need!_

So I guess it is something which I am in control of - just not sure how.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/7/d7ecf5b0e0265b9fe58aeb97606333565ee507e3.png)

Does anyone here have any idea on how to get Homey to display the correct characters as the outputted response?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 31, 2025, 9:01am UTC](https://community.homey.app/t/how-to-get-the-logic-get-request-to-output-correct-encoding/129361/2 "2025-01-31T09:01:37Z")

</div>

> [@Esben](#):
>
> While we’d love to assist you, we focus on general support and can’t dive into user-specific configurations.

Another victim of Athom’s new AI-powered support system 🤷🏼‍♂️

> [@Esben](#):
>
> Does anyone here have any idea on how to get Homey to display the correct characters as the outputted response?

It’ll be impossible with Homey flow cards, since those will almost certainly assume UTF-8.

Here’s a quick PoC for HomeyScript:

```auto
const url = 'https://dofbasen.dk/search/result.php?design=table&soeg=soeg&periode=antaldage&dage=7&omraade=lokal&lokal=584&artdata=art&hiddenart=08460&obstype=observationer&species=alle&sortering=dato';

const TextDecoder = (this.constructor.constructor("return TextDecoder"))();
const response = await fetch(url);
const buffer = await response.arrayBuffer();
const decoder = new TextDecoder('iso-8859-1');
const text = decoder.decode(buffer);

console.log(text);

```

---

<div class="post-metadata">

**Author:** ![Esben](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/esben/32/79405_2.png) [@Esben](https://community.homey.app/u/Esben)\
**Post date:** [January 31, 2025, 10:59am UTC](https://community.homey.app/t/how-to-get-the-logic-get-request-to-output-correct-encoding/129361/3 "2025-01-31T10:59:21Z")

</div>

Thanks so much!

It works using the Homeyscript instead of the logic card.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/5/359b9a10cb7be968cc8a8f2d7a27948fa4924b85.png)

So annoying that Athom doesn’t acknowledge this or at least hint at using a Homeyscript instead of their own logic card.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 31, 2025, 11:25am UTC](https://community.homey.app/t/how-to-get-the-logic-get-request-to-output-correct-encoding/129361/4 "2025-01-31T11:25:37Z")

</div>

> [@Esben](#):
>
> So annoying that Athom doesn’t acknowledge this or at least hints at using a Homeyscript instead of their own logic card.

They are sending out the exact same response to a lot of other users, which is why I think they starting using a (faulty) AI to handle support requests.
