<?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: How sending csv file as attachment from sas in utf-8  encoding? Encoding  and data are getting l in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-sending-csv-file-as-attachment-from-sas-in-utf-8-encoding/m-p/554955#M154430</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13761"&gt;@Catrin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let us know what SAS TechSupport advices.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My theory is that it's the email server and not SAS which changes things and that eventually defining a different mime type for the attachment will help (i.e. content_type set to something like text/csv inside the attach definition)&lt;/P&gt;</description>
    <pubDate>Tue, 30 Apr 2019 09:00:42 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2019-04-30T09:00:42Z</dc:date>
    <item>
      <title>How sending csv file as attachment from sas in utf-8  encoding? Encoding  and data are getting lost.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-sending-csv-file-as-attachment-from-sas-in-utf-8-encoding/m-p/554245#M154179</link>
      <description>&lt;P&gt;Hello to everybody,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We need to send .csv data with national character data via email to our customer&amp;nbsp; in encoding&amp;nbsp; utf-8. We are working with SAS&amp;nbsp; 9.4M4 on Linux. &lt;BR /&gt;The default encoding of the session is latin9. I am using Enterprise Guide 7.1 via terminal server.&lt;BR /&gt;My tests fail up to now. What I did is, to transcode the data from latin9 to utf-8. This works fine. But when using the .csv - file as attachment, the incoming email-attachment in Lotus Notes has lost the encoding&amp;nbsp; and also has lost data.&lt;/P&gt;
&lt;P&gt;I control the resulting data in Ultraedit.&lt;/P&gt;
&lt;P&gt;Please find my code attached&amp;nbsp; here. Any idea to solve the problem is very welcome. The &lt;STRONG&gt;testdat.csv&lt;/STRONG&gt; just after creating is attached and also the data after sending via email as &lt;STRONG&gt;testdat_send.csv&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* creating data for test */
data testdat;
    input name :$10. ort :$10.;
    datalines;
Böger Hamm
Müller Münster
Änder Steinfurt
Münig Holdorf
Bäger Hamm
Mäller Münster
Ünder Steinfurt
Mänig Holdorf
Büger Hamm
Möller Münster
Önder Steinfurt
Mönig Holdorf
;
run;

/*transcoding data to utf-8 encoding*/

filename output '/u/m500381/testdat.csv' encoding="utf-8";
proc export data=testdat outfile=output dbms=csv;
    delimiter=';';
run;

/*Opening the data in Ultraedit shows correct encoding and  complete data */
/* Now sending data as attachment */
filename mailaus email to=('c.skamira@lvm.de') 
subject='CSV Attachment'
from='Catrin'
type='text/plain'
attach=('/u/m500381/testdat.csv' encoding='utf-8'  outencoding='utf-8' 
 );


data _null_;
   file mailaus;
   put 'Testdat UTF-8';
run;

/* the log seems to be ok */


NOTE: The file MAILAUS is:
      E-Mail Access Device

Message sent
      To:          'x.sssssssss@xx.de'
      Cc:          
      Bcc:         
      Subject:     CSV Attachment
      Attachments: ( '/u/m500381/testdat.csv' ENCODING = 'utf-8' OUTENCODING = 'utf-8' ) 
NOTE: 1 record was written to the file MAILAUS.
      The minimum record length was 13.
      The maximum record length was 13.
NOTE: DATA statement used (Total process time):
      real time           0.16 seconds
      cpu time            0.00 seconds

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;After sending the email,only this data are included in&amp;nbsp; .csv file:&lt;BR /&gt;&lt;BR /&gt;name;ort&lt;BR /&gt;Böger;Hamm&lt;BR /&gt;Müller;Münster&lt;BR /&gt;Änder;Steinfurt&lt;BR /&gt;&lt;BR /&gt;and Ultraedit shows encoding ISO-8859-1. The file has 50 bytes. Before sending the file has 195 bytes and Ultraedit shows utf-8 as encoding.&lt;BR /&gt;&lt;BR /&gt;Kind regards&lt;BR /&gt;Catrin&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 13:24:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-sending-csv-file-as-attachment-from-sas-in-utf-8-encoding/m-p/554245#M154179</guid>
      <dc:creator>Catrin</dc:creator>
      <dc:date>2019-04-26T13:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: How sending csv file as attachment from sas in utf-8  encoding? Encoding  and data are getting l</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-sending-csv-file-as-attachment-from-sas-in-utf-8-encoding/m-p/554250#M154181</link>
      <description>Hi: &lt;BR /&gt;  My recommendation is to open a track with Tech Support. Encoding issues can be tricky and if this is a production process, you want to get the most accurate help possible. That will come from Tech Support.&lt;BR /&gt;Cynthia</description>
      <pubDate>Fri, 26 Apr 2019 13:36:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-sending-csv-file-as-attachment-from-sas-in-utf-8-encoding/m-p/554250#M154181</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-04-26T13:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: How sending csv file as attachment from sas in utf-8  encoding? Encoding  and data are getting l</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-sending-csv-file-as-attachment-from-sas-in-utf-8-encoding/m-p/554950#M154429</link>
      <description>&lt;P&gt;Hi Cynthia,&lt;BR /&gt;&lt;BR /&gt;thank you for replying. We will act on your advice and get in contact with Tech Support. &lt;BR /&gt;&lt;BR /&gt;Catrin&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 08:46:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-sending-csv-file-as-attachment-from-sas-in-utf-8-encoding/m-p/554950#M154429</guid>
      <dc:creator>Catrin</dc:creator>
      <dc:date>2019-04-30T08:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: How sending csv file as attachment from sas in utf-8  encoding? Encoding  and data are getting l</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-sending-csv-file-as-attachment-from-sas-in-utf-8-encoding/m-p/554955#M154430</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13761"&gt;@Catrin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let us know what SAS TechSupport advices.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My theory is that it's the email server and not SAS which changes things and that eventually defining a different mime type for the attachment will help (i.e. content_type set to something like text/csv inside the attach definition)&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 09:00:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-sending-csv-file-as-attachment-from-sas-in-utf-8-encoding/m-p/554955#M154430</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-04-30T09:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: How sending csv file as attachment from sas in utf-8  encoding? Encoding  and data are getting l</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-sending-csv-file-as-attachment-from-sas-in-utf-8-encoding/m-p/556702#M155106</link>
      <description>&lt;P&gt;Hi&amp;nbsp; Patrick,&lt;BR /&gt;&lt;BR /&gt;you were right, the email script is the location to change.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;A colleague used the information here:&lt;/P&gt;
&lt;P&gt;&lt;A href=" https://documentation.sas.com/?docsetId=hostunx&amp;amp;docsetTarget=p0raib8un6i57yn1funbemrct7wd.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=de" target="_self"&gt; https://documentation.sas.com/?docsetId=hostunx&amp;amp;docsetTarget=p0raib8un6i57yn1funbemrct7wd.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=de&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;to change&amp;nbsp; sending of .csv attachment with a&amp;nbsp; different script than smtp. Please see below how to change the program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards Catrin&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options emailsys="/sas94/SASFoundation/9.4/utilities/bin/sasm.elm.mime.utf8" ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 May 2019 09:17:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-sending-csv-file-as-attachment-from-sas-in-utf-8-encoding/m-p/556702#M155106</guid>
      <dc:creator>Catrin</dc:creator>
      <dc:date>2019-05-07T09:17:09Z</dc:date>
    </item>
  </channel>
</rss>

