<?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: Hindi to English in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Hindi-to-English/m-p/371699#M275922</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/110685"&gt;@avinashaecwb&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would use something like that. Basically, you need to know the length of Base64 encoded string. So in your case, you can use $base64x28., instead of $base64x32767. 32767 is the max length of string when using Base64.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let name ='4KSm4KWA4KSqIOCkmuCkguCkpg==';
%let name_decode = (%trim(%sysfunc(inputc(%scan(&amp;amp;name,1,':')===,$base64x32767.))));
%put &amp;amp;=name_decode;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jun 2017 14:10:58 GMT</pubDate>
    <dc:creator>alexal</dc:creator>
    <dc:date>2017-06-29T14:10:58Z</dc:date>
    <item>
      <title>Hindi to English</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hindi-to-English/m-p/371616#M275921</link>
      <description>&lt;P&gt;I have data in excel file in Base64 format. Typical row is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;REF_NO&lt;/TD&gt;&lt;TD&gt;ACC_REF_NO&lt;/TD&gt;&lt;TD&gt;FIN_YEAR&lt;/TD&gt;&lt;TD&gt;ACCUSED_NAME&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;303&lt;/TD&gt;&lt;TD&gt;325&lt;/TD&gt;&lt;TD&gt;20162017&lt;/TD&gt;&lt;TD&gt;4KSm4KWA4KSqIOCkmuCkguCkpg==&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to read this in SAS. Accused_Name is in Base64x format. If I decode it using generic websites on Google it returns "दीप चंद" which is Hindi text. I want the final result in English which should be "Deep Chand". How can I achieve this ? I am using below line of code to deocde base64 but it doesn't give even&amp;nbsp;&lt;SPAN&gt;दीप चंद.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let name&amp;nbsp;='4KSm4KWA4KSqIOCkmuCkguCkpg==';&lt;BR /&gt;%let name_decode&amp;nbsp;= (%sysfunc(inputc(%scan(&amp;amp;name,1,':')===,$base64x12.)));&lt;BR /&gt;%put &amp;amp;=name_decode;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 11:23:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hindi-to-English/m-p/371616#M275921</guid>
      <dc:creator>avinashaecwb</dc:creator>
      <dc:date>2017-06-29T11:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Hindi to English</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hindi-to-English/m-p/371699#M275922</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/110685"&gt;@avinashaecwb&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would use something like that. Basically, you need to know the length of Base64 encoded string. So in your case, you can use $base64x28., instead of $base64x32767. 32767 is the max length of string when using Base64.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let name ='4KSm4KWA4KSqIOCkmuCkguCkpg==';
%let name_decode = (%trim(%sysfunc(inputc(%scan(&amp;amp;name,1,':')===,$base64x32767.))));
%put &amp;amp;=name_decode;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 14:10:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hindi-to-English/m-p/371699#M275922</guid>
      <dc:creator>alexal</dc:creator>
      <dc:date>2017-06-29T14:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Hindi to English</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hindi-to-English/m-p/372019#M275923</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/41748"&gt;@alexal&lt;/a&gt;&amp;nbsp;- The output given by base64decode.org is&amp;nbsp;दीप चंद . But if I execute the code in SAS, it doesn't give this result. I am assuming that is because&amp;nbsp;दीप चंद is in Devnagri (Hindi) script. How can I force my SAS to decode the output in Devnagri script ? Would NLS help ? Finally, I need English output. So, first I need to Decode Base64 to Devnagri and then back to English.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 06:37:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hindi-to-English/m-p/372019#M275923</guid>
      <dc:creator>avinashaecwb</dc:creator>
      <dc:date>2017-06-30T06:37:52Z</dc:date>
    </item>
  </channel>
</rss>

