# Problem with special character in a Tag Name and the function system.tag.queryTagHistory

**URL:** <https://forum.inductiveautomation.com/t/problem-with-special-character-in-a-tag-name-and-the-function-system-tag-querytaghistory/56102>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [February 14, 2022, 1:23pm UTC](https://forum.inductiveautomation.com/t/problem-with-special-character-in-a-tag-name-and-the-function-system-tag-querytaghistory/56102 "2022-02-14T13:23:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniele1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/daniele1/32/31531_2.png) [@daniele1](https://forum.inductiveautomation.com/u/daniele1)\
**Post date:** [February 14, 2022, 1:23pm UTC](https://forum.inductiveautomation.com/t/problem-with-special-character-in-a-tag-name-and-the-function-system-tag-querytaghistory/56102/1 "2022-02-14T13:23:33Z")

</div>

Hi,  
I have a tag which is called “Umidità” and when I call the function system.tag.queryTagHistory on it to get its history and create a csv file with it the system return an empty dataset. It seems to me that the function doesn’t handle special characters well.  
Is there a solution to this or I have to rename the tag (and deal with broken links, transfer all the old tag history on the new one etc)?  
Thanks

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [February 14, 2022, 1:25pm UTC](https://forum.inductiveautomation.com/t/problem-with-special-character-in-a-tag-name-and-the-function-system-tag-querytaghistory/56102/2 "2022-02-14T13:25:12Z")

</div>

> [@daniele1](#):
>
> It seems to me that the function doesn’t handle special characters wel

Have you tested your script on a tag without such characters?

---

<div class="post-metadata">

**Author:** ![daniele1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/daniele1/32/31531_2.png) [@daniele1](https://forum.inductiveautomation.com/u/daniele1)\
**Post date:** [February 14, 2022, 1:44pm UTC](https://forum.inductiveautomation.com/t/problem-with-special-character-in-a-tag-name-and-the-function-system-tag-querytaghistory/56102/3 "2022-02-14T13:44:44Z")

</div>

It works with every other tag that doesn’t contains a special char

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [February 14, 2022, 1:54pm UTC](https://forum.inductiveautomation.com/t/problem-with-special-character-in-a-tag-name-and-the-function-system-tag-querytaghistory/56102/4 "2022-02-14T13:54:40Z")

</div>

> [@daniele1](#):
>
> Umidità

try setting a "u" infront of the string to convert it to unicode  
link so

```auto
system.tag.queryTagHistory(paths=[u"[default]Umidità"], startDate=...)

```

or use ".decode()" (default is utf-8)  
`"[default]Umidità".decode()`

---

<div class="post-metadata">

**Author:** ![daniele1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/daniele1/32/31531_2.png) [@daniele1](https://forum.inductiveautomation.com/u/daniele1)\
**Post date:** [February 14, 2022, 2:14pm UTC](https://forum.inductiveautomation.com/t/problem-with-special-character-in-a-tag-name-and-the-function-system-tag-querytaghistory/56102/5 "2022-02-14T14:14:10Z")

</div>

Thank you, it worked.
