<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Saving csv file with ANSI encoding in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Saving-csv-file-with-ANSI-encoding/m-p/102046#M48872</link>
    <description>Apologies, I had a typo.&lt;BR /&gt;&lt;BR /&gt;That worked like a charm. Thank you so much for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 19 Oct 2022 19:54:55 GMT</pubDate>
    <dc:creator>NupurSood</dc:creator>
    <dc:date>2022-10-19T19:54:55Z</dc:date>
    <item>
      <title>Saving csv file with ANSI encoding</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Saving-csv-file-with-ANSI-encoding/m-p/102039#M48865</link>
      <description>&lt;DIV&gt;Hello All &lt;BR /&gt;&lt;BR /&gt;We have a usecase where we need to store a csv string in a text file. To achieve the same we are leveraging "Write text file" action in "Utility - file management". However, the csv file created has UTF-8 encoding but we desire "ANSI" encoding. Would you please be able to suggest a method for the same. We tried writing a code where we are able to define encoding type but it doesn't take "ANSI" to be a valid encoding type.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;File.WriteAllText(File_Name, Text, System.Text.Encoding.GetEncoding(Encoding_Type))&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Any guidance would be great help.&lt;BR /&gt;&lt;BR /&gt;Thank YOu&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 13 Oct 2022 20:57:47 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Saving-csv-file-with-ANSI-encoding/m-p/102039#M48865</guid>
      <dc:creator>NupurSood</dc:creator>
      <dc:date>2022-10-13T20:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Saving csv file with ANSI encoding</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Saving-csv-file-with-ANSI-encoding/m-p/102040#M48866</link>
      <description>Hello &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/1003"&gt;@NupurSood&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;GetEncoding() returns an Encoding object based on a input code page.​ If you know you want ASCII why not just pass Encoding.ASCII in the WriteAllText() method?&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE class="language-vbnet"&gt;&lt;CODE&gt;File.WriteAllText(File_Name, Text System.Text.Encoding.ASCII)
​&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BR /&gt;Cheers,&lt;BR /&gt;Eric</description>
      <pubDate>Fri, 14 Oct 2022 02:27:36 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Saving-csv-file-with-ANSI-encoding/m-p/102040#M48866</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2022-10-14T02:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Saving csv file with ANSI encoding</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Saving-csv-file-with-ANSI-encoding/m-p/102041#M48867</link>
      <description>I just realized you were asking about ANSI as opposed to ASCII. 🤦‍&lt;span class="lia-unicode-emoji" title=":male_sign:"&gt;♂️&lt;/span&gt; Apologies for my lack of reading comprehension.&lt;BR /&gt;&lt;BR /&gt;What code page are you passing into GetEncoding()? Is it &lt;STRONG&gt;iso-8859-1&lt;/STRONG&gt;?&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Eric</description>
      <pubDate>Fri, 14 Oct 2022 02:48:50 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Saving-csv-file-with-ANSI-encoding/m-p/102041#M48867</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2022-10-14T02:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Saving csv file with ANSI encoding</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Saving-csv-file-with-ANSI-encoding/m-p/102042#M48868</link>
      <description>Hello &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/833"&gt;@ewilson&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you for your prompt response. I just need to be able to save a csv text as ANSI coded ​which can be done manually as shown in attached picture but we were hoping for a code for the same. I might be using the wrong command here but if i pass "Encoding_Type" as "UTF-8" the file gets saved as UTF-8. However if I pass "Encoding_Type" value as "ANSI", I get an error saying it is not a valid encoding
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="36913.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/36925i957E3C143A577B92/image-size/large?v=v2&amp;amp;px=999" role="button" title="36913.png" alt="36913.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 14 Oct 2022 16:38:19 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Saving-csv-file-with-ANSI-encoding/m-p/102042#M48868</guid>
      <dc:creator>NupurSood</dc:creator>
      <dc:date>2022-10-14T16:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Saving csv file with ANSI encoding</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Saving-csv-file-with-ANSI-encoding/m-p/102043#M48869</link>
      <description>Hi &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/1003"&gt;@NupurSood&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Can you try by searching the required encoding from the list and using the .Net Name for the same as Encoding_Type.&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers?redirectedfrom=MSDN" target="test_blank"&gt;https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers?redirectedfrom=MSDN&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I hope this helps!!&lt;BR /&gt;&lt;BR /&gt;Many Thanks,&lt;BR /&gt;KirtiMaan Talwar&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;​</description>
      <pubDate>Fri, 14 Oct 2022 16:53:13 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Saving-csv-file-with-ANSI-encoding/m-p/102043#M48869</guid>
      <dc:creator>kirtimaantalwar</dc:creator>
      <dc:date>2022-10-14T16:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Saving csv file with ANSI encoding</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Saving-csv-file-with-ANSI-encoding/m-p/102044#M48870</link>
      <description>&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/1003"&gt;@NupurSood&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;This works for me:&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE class="language-vbnet"&gt;&lt;CODE&gt;Dim data As String = "1,2,3,4,5,6,7,8,9,0"
System.IO.File.WriteAllText("C:\temp\TestFile.csv", data, System.Text.Encoding.GetEncoding("iso-8859-1"))&lt;/CODE&gt;&lt;/PRE&gt;
​&lt;BR /&gt;Cheers,&lt;BR /&gt;Eric</description>
      <pubDate>Fri, 14 Oct 2022 20:22:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Saving-csv-file-with-ANSI-encoding/m-p/102044#M48870</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2022-10-14T20:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Saving csv file with ANSI encoding</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Saving-csv-file-with-ANSI-encoding/m-p/102045#M48871</link>
      <description>Hello &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/833"&gt;@ewilson&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;I tried this but this still saves my file as UTF-8 encoding and not ​ANSI. Might I be missing some pre-condition here?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Nupur</description>
      <pubDate>Wed, 19 Oct 2022 19:25:24 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Saving-csv-file-with-ANSI-encoding/m-p/102045#M48871</guid>
      <dc:creator>NupurSood</dc:creator>
      <dc:date>2022-10-19T19:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: Saving csv file with ANSI encoding</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Saving-csv-file-with-ANSI-encoding/m-p/102046#M48872</link>
      <description>Apologies, I had a typo.&lt;BR /&gt;&lt;BR /&gt;That worked like a charm. Thank you so much for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Oct 2022 19:54:55 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Saving-csv-file-with-ANSI-encoding/m-p/102046#M48872</guid>
      <dc:creator>NupurSood</dc:creator>
      <dc:date>2022-10-19T19:54:55Z</dc:date>
    </item>
  </channel>
</rss>

