<?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: To create an XML file in UTF-8 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/To-create-an-XML-file-in-UTF-8/m-p/787793#M251786</link>
    <description>&lt;P&gt;Thanks Tom, It's working!!!!&lt;/P&gt;</description>
    <pubDate>Thu, 30 Dec 2021 15:40:58 GMT</pubDate>
    <dc:creator>sathasivam</dc:creator>
    <dc:date>2021-12-30T15:40:58Z</dc:date>
    <item>
      <title>To create an XML file in UTF-8</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-create-an-XML-file-in-UTF-8/m-p/787773#M251772</link>
      <description>&lt;P&gt;Hello all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset encoded in Latin1 and we are trying to create an XML file in UTF-8.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In generated XML file, a french character "è" is appearing as strange character (xE8)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even I tried to change the dataset to UTF-8 before creating XML file, but still the strange character exists.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Requesting you to help me to resolve this issue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 13:30:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-create-an-XML-file-in-UTF-8/m-p/787773#M251772</guid>
      <dc:creator>sathasivam</dc:creator>
      <dc:date>2021-12-30T13:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: To create an XML file in UTF-8</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-create-an-XML-file-in-UTF-8/m-p/787776#M251775</link>
      <description>&lt;P&gt;HOW did you try to create the XML file?&lt;/P&gt;
&lt;P&gt;If you are using data step and PUT statement to write it then make sure the ENCODING option is set on the FILE or FILENAME statement.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 13:53:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-create-an-XML-file-in-UTF-8/m-p/787776#M251775</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-12-30T13:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: To create an XML file in UTF-8</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-create-an-XML-file-in-UTF-8/m-p/787783#M251779</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your response. Am using data set and I have already used the same in my code as below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data com;&lt;BR /&gt;file "C:/temp/file1.xml";&lt;/P&gt;&lt;P&gt;put '&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 15:05:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-create-an-XML-file-in-UTF-8/m-p/787783#M251779</guid>
      <dc:creator>sathasivam</dc:creator>
      <dc:date>2021-12-30T15:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: To create an XML file in UTF-8</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-create-an-XML-file-in-UTF-8/m-p/787788#M251782</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/411289"&gt;@sathasivam&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Tom,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your response. Am using data set and I have already used the same in my code as below:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data com;&lt;BR /&gt;file "C:/temp/file1.xml";&lt;/P&gt;
&lt;P&gt;put '&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That is just telling the future users of the resulting file to interpret the text as UTF-8. That is not going to make an difference to how SAS will write the values into the file.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data com;
  file "C:/temp/file1.xml" encoding='utf-8';
  put '&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;';
  ...
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Dec 2021 15:24:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-create-an-XML-file-in-UTF-8/m-p/787788#M251782</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-12-30T15:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: To create an XML file in UTF-8</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-create-an-XML-file-in-UTF-8/m-p/787793#M251786</link>
      <description>&lt;P&gt;Thanks Tom, It's working!!!!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 15:40:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-create-an-XML-file-in-UTF-8/m-p/787793#M251786</guid>
      <dc:creator>sathasivam</dc:creator>
      <dc:date>2021-12-30T15:40:58Z</dc:date>
    </item>
  </channel>
</rss>

