<?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 XML - Importation's issue - Cause Encoding in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/XML-Importation-s-issue-Cause-Encoding/m-p/852756#M337062</link>
    <description>&lt;PRE&gt;Hello,
I have an XML file to import into SAS BASE.
The line to import this file are into the enclosed zip in attachment.&lt;BR /&gt;The error is "Some code points did not tanscode ..."&lt;BR /&gt;The XML is encoding in ISO-8159-1 with some HMTL caracters like &amp;amp;#____ as pattern;
&lt;BR /&gt;Someone have an idea to import all line of the XML ?&lt;BR /&gt;Thank you for your reponse&lt;/PRE&gt;</description>
    <pubDate>Mon, 09 Jan 2023 11:05:49 GMT</pubDate>
    <dc:creator>FGRIGNOUX</dc:creator>
    <dc:date>2023-01-09T11:05:49Z</dc:date>
    <item>
      <title>XML - Importation's issue - Cause Encoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XML-Importation-s-issue-Cause-Encoding/m-p/852756#M337062</link>
      <description>&lt;PRE&gt;Hello,
I have an XML file to import into SAS BASE.
The line to import this file are into the enclosed zip in attachment.&lt;BR /&gt;The error is "Some code points did not tanscode ..."&lt;BR /&gt;The XML is encoding in ISO-8159-1 with some HMTL caracters like &amp;amp;#____ as pattern;
&lt;BR /&gt;Someone have an idea to import all line of the XML ?&lt;BR /&gt;Thank you for your reponse&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Jan 2023 11:05:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XML-Importation-s-issue-Cause-Encoding/m-p/852756#M337062</guid>
      <dc:creator>FGRIGNOUX</dc:creator>
      <dc:date>2023-01-09T11:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: XML - Importation's issue - Cause Encoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XML-Importation-s-issue-Cause-Encoding/m-p/852780#M337067</link>
      <description>&lt;P&gt;You could remove these &amp;amp;#___; before importing xml file ,&amp;nbsp; if these&amp;nbsp; &amp;amp;#___;&amp;nbsp; were useless.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
infile "C:\temp\a\Test.xml";
file "%sysfunc(pathname(work))\Test.xml";
input;
_infile_=prxchange('s/&amp;amp;#\w+;//',-1,_infile_);
put _infile_;
run;


libname tempxml xmlv2 "%sysfunc(pathname(work))\Test.xml" xmlmap ="C:\temp\a\map.map"  ;

proc copy in=tempxml out=work noclone;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Jan 2023 12:29:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XML-Importation-s-issue-Cause-Encoding/m-p/852780#M337067</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-01-09T12:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: XML - Importation's issue - Cause Encoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XML-Importation-s-issue-Cause-Encoding/m-p/852784#M337069</link>
      <description>&lt;P&gt;The encoded values are multibyte. You need to run your SAS session in multibyte mode in order to transcode these values and write them as multibyte to a SAS table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your code as such works for me in a multibyte session. I can replicate the error you get when running SAS in single byte mode.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1673268185125.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79177i6B52EFA2950771A0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_0-1673268185125.png" alt="Patrick_0-1673268185125.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Running below code will tell you what's set for your SAS session. Talk to your SAS admin/support person to get the info how to create a SAS session in multibyte mode.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc options group=LANGUAGECONTROL;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 12:49:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XML-Importation-s-issue-Cause-Encoding/m-p/852784#M337069</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-01-09T12:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: XML - Importation's issue - Cause Encoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XML-Importation-s-issue-Cause-Encoding/m-p/853048#M337187</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
/*
@Patrick is right.
If you were using UNICODE SAS to run code,
you would get right result.
*/

libname tempxml xmlv2 "C:\temp\x\Test.xml" xmlmap ="C:\temp\x\map.map"  ;

proc copy in=tempxml out=work noclone;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1673351051604.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79225iF6421949F49063F6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1673351051604.png" alt="Ksharp_0-1673351051604.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 11:44:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XML-Importation-s-issue-Cause-Encoding/m-p/853048#M337187</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-01-10T11:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: XML - Importation's issue - Cause Encoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XML-Importation-s-issue-Cause-Encoding/m-p/853055#M337191</link>
      <description>Thank you all for your response !</description>
      <pubDate>Tue, 10 Jan 2023 12:40:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XML-Importation-s-issue-Cause-Encoding/m-p/853055#M337191</guid>
      <dc:creator>FGRIGNOUX</dc:creator>
      <dc:date>2023-01-10T12:40:57Z</dc:date>
    </item>
  </channel>
</rss>

