# Problems with encoding when unzipping files

**URL:** <https://discourse.openiap.io/t/problems-with-encoding-when-unzipping-files/811>\
**Category:** OpenRPA\
**Tags:** openrpa\
**Created:** [September 6, 2023, 12:36pm UTC](https://discourse.openiap.io/t/problems-with-encoding-when-unzipping-files/811 "2023-09-06T12:36:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Velinkton](https://discourse.openiap.io/user_avatar/discourse.openiap.io/velinkton/32/931_2.png) [@Velinkton](https://discourse.openiap.io/u/Velinkton)\
**Post date:** [September 6, 2023, 12:36pm UTC](https://discourse.openiap.io/t/problems-with-encoding-when-unzipping-files/811/1 "2023-09-06T12:36:59Z")

</div>

Greetings

When I try to unzip a zip file using the “ExpandArchive” block, as a result, the encoding of the files gets lost. I tried using the “System.IO.Compression.ZipFile.ExtractToDirectory” function with the encoding in the parameter, but got the same result. I tried to unpack the archive with both Cyrillic and Latin characters - the result is always the same

How can I fix this?  
 ![image](https://discourse.openiap.io/uploads/default/original/1X/940b5344f676c04249faeafa6fdefd922ec7c64b.png)

---

<div class="post-metadata">

**Author:** ![Allan\_Zimmermann](https://discourse.openiap.io/user_avatar/discourse.openiap.io/allan_zimmermann/32/12_2.png) [@Allan\_Zimmermann](https://discourse.openiap.io/u/Allan_Zimmermann)\
**Post date:** [September 6, 2023, 1:40pm UTC](https://discourse.openiap.io/t/problems-with-encoding-when-unzipping-files/811/2 "2023-09-06T13:40:02Z")

</div>

I do the same, as you can see

> <https://github.com/open-rpa/openrpa/blob/master/OpenRPA.Utilities/Activities/ExpandArchive.cs>

If you can easily test, maybe test if this solves the issue ?

```auto
Encoding.GetEncoding(850);

```

from:

> <https://stackoverflow.com/questions/59734984/char-extraction-issue-with-zipfile-system-io-compression-c-wpf>

---

<div class="post-metadata">

**Author:** ![Velinkton](https://discourse.openiap.io/user_avatar/discourse.openiap.io/velinkton/32/931_2.png) [@Velinkton](https://discourse.openiap.io/u/Velinkton)\
**Post date:** [September 6, 2023, 2:07pm UTC](https://discourse.openiap.io/t/problems-with-encoding-when-unzipping-files/811/3 "2023-09-06T14:07:33Z")

</div>

Unfortunately, it did not help me, although this time the characters are different  
 ![image](https://discourse.openiap.io/uploads/default/original/1X/e5ac4e037b9134c0c0d01ffa648fbd48cc27be7e.png)

---

<div class="post-metadata">

**Author:** ![Allan\_Zimmermann](https://discourse.openiap.io/user_avatar/discourse.openiap.io/allan_zimmermann/32/12_2.png) [@Allan\_Zimmermann](https://discourse.openiap.io/u/Allan_Zimmermann)\
**Post date:** [September 6, 2023, 2:33pm UTC](https://discourse.openiap.io/t/problems-with-encoding-when-unzipping-files/811/4 "2023-09-06T14:33:04Z")

</div>

Try some more variations …  
maybe this

> <https://stackoverflow.com/questions/42462169/use-specific-encoding-for-reading-ziparchive>

---

<div class="post-metadata">

**Author:** ![Velinkton](https://discourse.openiap.io/user_avatar/discourse.openiap.io/velinkton/32/931_2.png) [@Velinkton](https://discourse.openiap.io/u/Velinkton)\
**Post date:** [September 7, 2023, 7:53am UTC](https://discourse.openiap.io/t/problems-with-encoding-when-unzipping-files/811/5 "2023-09-07T07:53:58Z")

</div>

SP866 encoding helped. I do not understand why other encodings containing Cyrillic characters could not process my file

Thank you very much!

---

<div class="post-metadata">

**Author:** ![Allan\_Zimmermann](https://discourse.openiap.io/user_avatar/discourse.openiap.io/allan_zimmermann/32/12_2.png) [@Allan\_Zimmermann](https://discourse.openiap.io/u/Allan_Zimmermann)\
**Post date:** [September 7, 2023, 8:15am UTC](https://discourse.openiap.io/t/problems-with-encoding-when-unzipping-files/811/6 "2023-09-07T08:15:51Z")

</div>

Thank you for the feedback.  
I will see if I can add an option to the two archive activities for setting this, but for now I’m glad you have a solution.

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openiap.io/uploads/default/original/2X/a/a1ca7b164ac9a826839704d9ac82c7b5e6bcf557.png) [@system](https://discourse.openiap.io/u/system)\
**Post date:** [September 10, 2023, 8:15am UTC](https://discourse.openiap.io/t/problems-with-encoding-when-unzipping-files/811/7 "2023-09-10T08:15:56Z")

</div>

Closed on September 10, 2023, 8:15am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
