# Write CSV with encoding fail

**URL:** <https://forum.uipath.com/t/write-csv-with-encoding-fail/606646>\
**Category:** Activities\
**Tags:** excel, activities\
**Created:** [September 25, 2023, 3:20pm UTC](https://forum.uipath.com/t/write-csv-with-encoding-fail/606646 "2023-09-25T15:20:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Romain\_80000](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/romain_80000/32/429464_2.png) [@Romain\_80000](https://forum.uipath.com/u/Romain_80000)\
**Post date:** [September 25, 2023, 3:20pm UTC](https://forum.uipath.com/t/write-csv-with-encoding-fail/606646/1 "2023-09-25T15:20:09Z")

</div>

Hi Everyone,

I’m trying to write a csv file with WriteCsvFile Activity using encoding “iso-8859-15”.  
But I’ve an error on execution.

“Ecrire fichier CSV: ‘iso-8859-15’ is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. (Parameter ‘name’)”

I’ve tried “iso-8859-1”, “ASCII-us” but I have the same error.  
I’m using Studio 2023.4.2

Regards

---

<div class="post-metadata">

**Author:** ![Palaniyappan](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/palaniyappan/32/524095_2.png) [@Palaniyappan](https://forum.uipath.com/u/Palaniyappan)\
**Post date:** [September 25, 2023, 3:46pm UTC](https://forum.uipath.com/t/write-csv-with-encoding-fail/606646/2 "2023-09-25T15:46:36Z")

</div>

Hi

The error you’re encountering is because the “iso-8859-15” encoding is not supported directly in UiPath’s Write CSV activity.  
U can check this doc  
[https://docs.uipath.com/activities/other/latest/workflow/supported-character-encoding](https://docs.uipath.com/activities/other/latest/workflow/supported-character-encoding)

Hope this clarifies

Cheers @Romain_80000

---

<div class="post-metadata">

**Author:** ![Praveen\_Mudhiraj](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/praveen_mudhiraj/32/420424_2.png) [@Praveen\_Mudhiraj](https://forum.uipath.com/u/Praveen_Mudhiraj)\
**Post date:** [September 25, 2023, 4:07pm UTC](https://forum.uipath.com/t/write-csv-with-encoding-fail/606646/3 "2023-09-25T16:07:49Z")

</div>

The error message indicates that “iso-8859-15” is not a supported encoding name. This is because the .NET Framework used by UiPath may not include this specific encoding by default.

you can try the following steps… Hope may help

1.Use a Supported Encoding: Instead of “iso-8859-15,” try using a supported encoding like “ISO-8859-1” (also known as Latin-1) which is more commonly available

2.Use “Windows-1252” Encoding: If ISO-8859-1 doesn’t work, you can try using “Windows-1252” encoding, which is similar to ISO-8859-1.

3.Custom Encoding: If you absolutely need to use “iso-8859-15” and it’s not available by default, you may need to create a custom encoding provider using Encoding.RegisterProvider as suggested in the error message. However, this is a more advanced step and may require coding expertise.

Here’s an example of how you might use “ISO-8859-1” encoding in UiPath:

Encoding.GetEncoding(“ISO-8859-1”).GetString(yourBytes)

@Romain_80000

---

<div class="post-metadata">

**Author:** ![ppr](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ppr/32/464097_2.png) [@ppr](https://forum.uipath.com/u/ppr)\
**Post date:** [September 25, 2023, 9:52pm UTC](https://forum.uipath.com/t/write-csv-with-encoding-fail/606646/4 "2023-09-25T21:52:22Z")

</div>

> [@Romain\_80000](#):
>
> For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. (Parameter ‘name’)

Tracker:

> [@\[InfoSet\] - LegacyToWindows Migration # Issue - Mapping Set - Fix Tracker](https://forum.uipath.com/t/infoset-legacytowindows-migration-issue-mapping-set-fix-tracker/559058):
>
> This post is currently in a preview version. New statuses are checked regularly and trackers are updated Introduction In the past, problems have been observed within legacy-to-Windows code conversions. [Workarounds](https://forum.uipath.com/t/infoset-legacytowindows-migration-information-index/554052#mapping-sets-code-conversion-mappings-5) have been found for some of these problems. From this, a [mapping set](https://forum.uipath.com/t/infoset-legacytowindows-migration-mapping-sets/557879) could be derived. At a later time fixes were realized and the problems were remedied. In this part of the [InfoSet] - LegacyToWindows Migration series, the issue, and the related progress are tracked. Scope With…

Workaround, when an UiPath.System.Activities / UiPath.Excel.Activities Package Version is used, which has not already adapted:  
[2.11 Unsupported specific character encoding](https://forum.uipath.com/t/troubleshooting-guide-conversion-from-windows-legacy-project-to-windows-project/500552#h-211-unsupported-specific-character-encoding-13)

---

<div class="post-metadata">

**Author:** ![Yoichi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yoichi/32/523754_2.png) [@Yoichi](https://forum.uipath.com/u/Yoichi)\
**Post date:** [September 25, 2023, 11:16pm UTC](https://forum.uipath.com/t/write-csv-with-encoding-fail/606646/5 "2023-09-25T23:16:19Z")

</div>

Hi,

Can you try to call `System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance)` using InvokeMethod as the following sample?

 ![image](https://global.discourse-cdn.com/uipath/original/4X/2/e/6/2e66579144b278c8f0220814fe1a57067b1b0849.png)

[Sample20230926-1.zip](https://forum.uipath.com/uploads/short-url/ksjzVxnUOhfauSHmeyWH660zwXe.zip) (3.0 KB)

Regards,

---

<div class="post-metadata">

**Author:** ![Romain\_80000](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/romain_80000/32/429464_2.png) [@Romain\_80000](https://forum.uipath.com/u/Romain_80000)\
**Post date:** [September 26, 2023, 6:50am UTC](https://forum.uipath.com/t/write-csv-with-encoding-fail/606646/6 "2023-09-26T06:50:50Z")

</div>

Thank you all for your help.

@Praveen_Mudhiraj  
Do you have an example of using Encoding.RegisterProvider in C#.

@Yoichi  
Thanks but I have a compilation error. I’m in C# maybe that’s the cause. Do you have the same thing in C#?

 ![capture](https://global.discourse-cdn.com/uipath/original/4X/7/d/2/7d2058347eac9924a21d9435726cf17747784e24.png)

---

<div class="post-metadata">

**Author:** ![Yoichi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yoichi/32/523754_2.png) [@Yoichi](https://forum.uipath.com/u/Yoichi)\
**Post date:** [September 26, 2023, 6:55am UTC](https://forum.uipath.com/t/write-csv-with-encoding-fail/606646/7 "2023-09-26T06:55:45Z")

</div>

HI,

How about the following?

 ![image](https://global.discourse-cdn.com/uipath/original/4X/8/6/1/8618a7e0bab7226e75d6a90e05369702f01edb79.png)

Sample  
[Sample20230925-1CS.zip](https://forum.uipath.com/uploads/short-url/gFRZocgozeAoMVxAEvXGX91f20O.zip) (3.2 KB)

Regards,

---

<div class="post-metadata">

**Author:** ![Romain\_80000](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/romain_80000/32/429464_2.png) [@Romain\_80000](https://forum.uipath.com/u/Romain_80000)\
**Post date:** [September 26, 2023, 7:34am UTC](https://forum.uipath.com/t/write-csv-with-encoding-fail/606646/8 "2023-09-26T07:34:36Z")

</div>

@Yoichi

Thank you very much, I understand, if we copy and paste the method it does not put the references in the workflow.  
Typing by hand solved the problem.

どうもありがとう

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [October 3, 2023, 6:14am UTC](https://forum.uipath.com/t/write-csv-with-encoding-fail/606646/9 "2023-10-03T06:14:41Z")

</div>

Closed on October 3, 2023, 6:14am UTC

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