<?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: Compress array is adding weird characters in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Compress-array-is-adding-weird-characters/m-p/949312#M83741</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;compress(Chars[i],,'kw') would also keep the Chinese,Japanese ..... charaters as a-zA-Z .&lt;BR /&gt;Therefore you need to use 'kad' if you only want keep alphabeta（a-zA-Z) and digit(0-9) characters.&lt;BR /&gt;&lt;BR /&gt;Chars[i] = compress(Chars[i],,'kad');&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;Wouldn't it need to be &lt;STRONG&gt;K&lt;/STRONG&gt;compress() ?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2024 03:32:59 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2024-10-29T03:32:59Z</dc:date>
    <item>
      <title>Compress array is adding weird characters</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Compress-array-is-adding-weird-characters/m-p/949301#M83738</link>
      <description>&lt;P&gt;I run this block before I send data to GCP but for some reason, it is adding weird characters to my strings that aren't there before the compress.&lt;/P&gt;&lt;PRE&gt;array Chars[*] _character_;
   do i = 1 to dim(Chars);
      Chars[i] = compress(Chars[i],,'kw');
   end;
   drop i;
array Nums[*] _numeric_;
   do i = 1 to dim(Nums);
      Nums[i] = round(Nums[i],0.01);
   end;
   drop i;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ProcWes_0-1730149330622.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101839iD4BB9933B778C1FA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ProcWes_0-1730149330622.png" alt="ProcWes_0-1730149330622.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;These weird characters, the&amp;nbsp;@ etc.&amp;nbsp; Is there a better way to go about this?&amp;nbsp; Where are these coming from??&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 21:02:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Compress-array-is-adding-weird-characters/m-p/949301#M83738</guid>
      <dc:creator>ProcWes</dc:creator>
      <dc:date>2024-10-28T21:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Compress array is adding weird characters</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Compress-array-is-adding-weird-characters/m-p/949302#M83739</link>
      <description>&lt;P&gt;Are you using DBCS or MBCS.&amp;nbsp; You might try KCOMPRESS to resolve issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/151081"&gt;@ProcWes&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I run this block before I send data to GCP but for some reason, it is adding weird characters to my strings that aren't there before the compress.&lt;/P&gt;
&lt;PRE&gt;array Chars[*] _character_;
   do i = 1 to dim(Chars);
      Chars[i] = compress(Chars[i],,'kw');
   end;
   drop i;
array Nums[*] _numeric_;
   do i = 1 to dim(Nums);
      Nums[i] = round(Nums[i],0.01);
   end;
   drop i;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ProcWes_0-1730149330622.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101839iD4BB9933B778C1FA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ProcWes_0-1730149330622.png" alt="ProcWes_0-1730149330622.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;These weird characters, the&amp;nbsp;@ etc.&amp;nbsp; Is there a better way to go about this?&amp;nbsp; Where are these coming from??&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 21:15:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Compress-array-is-adding-weird-characters/m-p/949302#M83739</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2024-10-28T21:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Compress array is adding weird characters</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Compress-array-is-adding-weird-characters/m-p/949310#M83740</link>
      <description>compress(Chars[i],,'kw') would also keep the Chinese,Japanese .....  charaters  as a-zA-Z .&lt;BR /&gt;Therefore you need to use 'kad'  if you only want keep alphabeta（a-zA-Z)  and digit(0-9) characters.&lt;BR /&gt;&lt;BR /&gt; Chars[i] = compress(Chars[i],,'kad');&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Oct 2024 01:52:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Compress-array-is-adding-weird-characters/m-p/949310#M83740</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-10-29T01:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Compress array is adding weird characters</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Compress-array-is-adding-weird-characters/m-p/949312#M83741</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;compress(Chars[i],,'kw') would also keep the Chinese,Japanese ..... charaters as a-zA-Z .&lt;BR /&gt;Therefore you need to use 'kad' if you only want keep alphabeta（a-zA-Z) and digit(0-9) characters.&lt;BR /&gt;&lt;BR /&gt;Chars[i] = compress(Chars[i],,'kad');&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;Wouldn't it need to be &lt;STRONG&gt;K&lt;/STRONG&gt;compress() ?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 03:32:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Compress-array-is-adding-weird-characters/m-p/949312#M83741</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-10-29T03:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Compress array is adding weird characters</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Compress-array-is-adding-weird-characters/m-p/949321#M83742</link>
      <description>Patrick,&lt;BR /&gt;If OP only need to keep characters (a-zA-Z0-9) , then COMPRESS() and KCOMPRESS() is the same. KCOMPRESS() has the ability to process Chinese,Japanes ....... DBMS characters.</description>
      <pubDate>Tue, 29 Oct 2024 06:12:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Compress-array-is-adding-weird-characters/m-p/949321#M83742</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-10-29T06:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Compress array is adding weird characters</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Compress-array-is-adding-weird-characters/m-p/949357#M83743</link>
      <description>&lt;P&gt;Hi, these replies haven't been solutions to this point.&amp;nbsp; Compress isn't removing these:&amp;nbsp;ÀõÖ@ because they're showing up as letters and punctuation.&amp;nbsp; What's troubling to me is that these characters do not exist on the input, even if I convert the string to hex format, they're not there.&amp;nbsp; The compress is creating them.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Controllable Fraud - Other 436F6E74726F6C6C61626C65204672617564202D204F7468657220202020202020202020202020202020202020202020&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 14:04:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Compress-array-is-adding-weird-characters/m-p/949357#M83743</guid>
      <dc:creator>ProcWes</dc:creator>
      <dc:date>2024-10-29T14:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Compress array is adding weird characters</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Compress-array-is-adding-weird-characters/m-p/949361#M83744</link>
      <description>&lt;P&gt;could you share results of this code with us:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
  set &amp;lt;your Data Set&amp;gt; (keep= &amp;lt;one variable that makes problems&amp;gt;);
  test1=&amp;lt;one variable that makes problems&amp;gt;;
  test2 = compress(test1,,'kw');
  a=put(test1,$hex128.);
  b=put(test2,$hex128.);
run;
proc print data = test;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 15:18:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Compress-array-is-adding-weird-characters/m-p/949361#M83744</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2024-10-29T15:18:19Z</dc:date>
    </item>
  </channel>
</rss>

