<?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 ODS package changing encoding of the zipped files in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-package-changing-encoding-of-the-zipped-files/m-p/198285#M13264</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My sas environment is set with global encoding UTF-8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to export my SAS dataset into a UTF-16 encoded csv file to feed the file into another application. I was able to do this successfully. However, when I try to zip the UTF-16 encoded file(s) using ODS package, the encoding of the zipped files change automatically to ANSI. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the macro i used for zipping:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro test;&lt;/P&gt;&lt;P&gt; options lrecl=10000 ;&lt;BR /&gt; ods package(test) open ;&lt;/P&gt;&lt;P&gt; filename fil1 "&amp;amp;_outbound./&amp;amp;file1." encoding="utf-16le";&lt;/P&gt;&lt;P&gt; ods package(test) add file=fil1;&lt;/P&gt;&lt;P&gt; filename fil2 "&amp;amp;_outbound./&amp;amp;file2." encoding="utf-16le";&lt;/P&gt;&lt;P&gt; ods package(test) add file=fil2;&lt;/P&gt;&lt;P&gt;ods package(test) publish archive properties(archive_name="zipfile.zip" archive_path="/home/loc" );&lt;BR /&gt;ods package(test) close clear;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have verified that "&amp;amp;_outbound./&amp;amp;file1" is UTF-16. But the same file extracted from zipfile.zip archive is ANSI. Is there any option to set encoding here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Jul 2015 15:01:45 GMT</pubDate>
    <dc:creator>DCL</dc:creator>
    <dc:date>2015-07-08T15:01:45Z</dc:date>
    <item>
      <title>ODS package changing encoding of the zipped files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-package-changing-encoding-of-the-zipped-files/m-p/198285#M13264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My sas environment is set with global encoding UTF-8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to export my SAS dataset into a UTF-16 encoded csv file to feed the file into another application. I was able to do this successfully. However, when I try to zip the UTF-16 encoded file(s) using ODS package, the encoding of the zipped files change automatically to ANSI. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the macro i used for zipping:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro test;&lt;/P&gt;&lt;P&gt; options lrecl=10000 ;&lt;BR /&gt; ods package(test) open ;&lt;/P&gt;&lt;P&gt; filename fil1 "&amp;amp;_outbound./&amp;amp;file1." encoding="utf-16le";&lt;/P&gt;&lt;P&gt; ods package(test) add file=fil1;&lt;/P&gt;&lt;P&gt; filename fil2 "&amp;amp;_outbound./&amp;amp;file2." encoding="utf-16le";&lt;/P&gt;&lt;P&gt; ods package(test) add file=fil2;&lt;/P&gt;&lt;P&gt;ods package(test) publish archive properties(archive_name="zipfile.zip" archive_path="/home/loc" );&lt;BR /&gt;ods package(test) close clear;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have verified that "&amp;amp;_outbound./&amp;amp;file1" is UTF-16. But the same file extracted from zipfile.zip archive is ANSI. Is there any option to set encoding here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 15:01:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-package-changing-encoding-of-the-zipped-files/m-p/198285#M13264</guid>
      <dc:creator>DCL</dc:creator>
      <dc:date>2015-07-08T15:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: ODS package changing encoding of the zipped files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-package-changing-encoding-of-the-zipped-files/m-p/198286#M13265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; I think this is a question for Tech Support. To open a track with Tech Support, follow the instructions here: &lt;A href="https://support.sas.com/ctx/supportform/createForm" title="https://support.sas.com/ctx/supportform/createForm"&gt;Technical Support Form&lt;/A&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 15:36:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-package-changing-encoding-of-the-zipped-files/m-p/198286#M13265</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-07-09T15:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: ODS package changing encoding of the zipped files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-package-changing-encoding-of-the-zipped-files/m-p/198287#M13266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Cynthia, i shall do as you suggested.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2015 02:48:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-package-changing-encoding-of-the-zipped-files/m-p/198287#M13266</guid>
      <dc:creator>DCL</dc:creator>
      <dc:date>2015-07-10T02:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: ODS package changing encoding of the zipped files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-package-changing-encoding-of-the-zipped-files/m-p/336441#M18036</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just to update on this topic- I had raised this issue to SAS tech Support but unfortunately did not recieve any useful solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My application has now migrated to SAS9.4. I did a quick search in SAS docs but couldnt find any major enhancements to ODS package in 9.4 (that could preserve the encoding type of the file).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there are any thoughts, please let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Dilip&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 05:39:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-package-changing-encoding-of-the-zipped-files/m-p/336441#M18036</guid>
      <dc:creator>DCL</dc:creator>
      <dc:date>2017-02-28T05:39:24Z</dc:date>
    </item>
  </channel>
</rss>

