<?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: C# AIM code and non-english character in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-AIM-code-and-non-english-character/m-p/32917#M17461</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="ColorBandedcontent" style="position: relative; padding-bottom: 0px; padding-left: 3px; padding-right: 3px; clear: both; padding-top: 0px;"&gt;
&lt;DIV id="imcontent" style="margin-left: 12px;"&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;Hi,&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;You should no longer see any issues from Authorize.Net accepting these international characters. It looks like the error that you are seeing is something within the .Net architecture. Unfortunately, we don't have a workaround that we can provide you.&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;Thanks,&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;Joy&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 05 Feb 2013 23:28:53 GMT</pubDate>
    <dc:creator>Joy</dc:creator>
    <dc:date>2013-02-05T23:28:53Z</dc:date>
    <item>
      <title>C# AIM code and non-english character</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-AIM-code-and-non-english-character/m-p/1132#M964</link>
      <description>&lt;P&gt;I use the C# sample posting code from the developer website, it works for all-english address. However, when I use non-english addresses like &lt;SPAN&gt;Montréal, it throws &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Bytes to be written to the stream exceed the Content-Length bytes size specified.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;when calling&lt;/P&gt;&lt;P&gt;myWriter.Write(strPost);&lt;BR /&gt;---&amp;gt; myWriter.Flush(); // throw exception&lt;BR /&gt;what I found out is the sample code using strPost.Length as HttpWebRequest.ContentLength, but non-english characters count more than 1 in stream. I tried other method,&lt;/P&gt;&lt;P&gt;like use&lt;/P&gt;&lt;P&gt;byte[] buffer =&amp;nbsp;&lt;FONT size="2"&gt;System.Text.&lt;/FONT&gt;&lt;FONT color="#2b91af" size="2"&gt;&lt;FONT color="#2b91af" size="2"&gt;Encoding&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;.UTF8.GetBytes(strPost);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;objRequest.ContentLength = buffer.Length;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;myWriter =&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#2b91af" size="2"&gt;&lt;FONT color="#2b91af" size="2"&gt;StreamWriter&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;(objRequest.GetRequestStream(), System.Text.&lt;/FONT&gt;&lt;FONT color="#2b91af" size="2"&gt;&lt;FONT color="#2b91af" size="2"&gt;Encoding&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;.UTF8);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;myWriter.Write(buffer);&lt;/P&gt;&lt;P&gt;myWriter.Close();&lt;/P&gt;&lt;P&gt;I got &lt;EM&gt;Cannot close stream until all bytes are written.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;So I wonder what's the correct code should be.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2009 20:50:56 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-AIM-code-and-non-english-character/m-p/1132#M964</guid>
      <dc:creator>chengbao</dc:creator>
      <dc:date>2009-12-10T20:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: C# AIM code and non-english character</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-AIM-code-and-non-english-character/m-p/1224#M1049</link>
      <description>&lt;P&gt;Hey chengbao,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, non-English characters are not allowed in any of our APIs. Try submitting the request with standard English characters and see if that works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Michelle&lt;/P&gt;
&lt;P&gt;Developer Community Manager&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2009 21:47:02 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-AIM-code-and-non-english-character/m-p/1224#M1049</guid>
      <dc:creator>Michelle</dc:creator>
      <dc:date>2009-12-18T21:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: C# AIM code and non-english character</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-AIM-code-and-non-english-character/m-p/13420#M8028</link>
      <description>&lt;P&gt;Michelle -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Can you please provide sample code on how to handle International Address? Or Should we not pass the address if the country is outside US and Canada?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help as we are having trouble with international customers trying to checkout.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;TechMate&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2011 12:25:56 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-AIM-code-and-non-english-character/m-p/13420#M8028</guid>
      <dc:creator>techmate</dc:creator>
      <dc:date>2011-06-07T12:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: C# AIM code and non-english character</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-AIM-code-and-non-english-character/m-p/32871#M17415</link>
      <description>&lt;P&gt;We're having this same issue. &amp;nbsp;Was a workaround ever suggested?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've seen another post at - &lt;A target="_blank" href="http://forums.asp.net/t/1396312.aspx/1"&gt;http://forums.asp.net/t/1396312.aspx/1&lt;/A&gt;&amp;nbsp;- which suggests that this command might work:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;request.GetPreloadedEntityBody();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you advise please?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Rafi&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Feb 2013 09:39:35 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-AIM-code-and-non-english-character/m-p/32871#M17415</guid>
      <dc:creator>rghazarian</dc:creator>
      <dc:date>2013-02-02T09:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: C# AIM code and non-english character</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-AIM-code-and-non-english-character/m-p/32917#M17461</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="ColorBandedcontent" style="position: relative; padding-bottom: 0px; padding-left: 3px; padding-right: 3px; clear: both; padding-top: 0px;"&gt;
&lt;DIV id="imcontent" style="margin-left: 12px;"&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;Hi,&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;You should no longer see any issues from Authorize.Net accepting these international characters. It looks like the error that you are seeing is something within the .Net architecture. Unfortunately, we don't have a workaround that we can provide you.&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;Thanks,&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;Joy&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 05 Feb 2013 23:28:53 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/C-AIM-code-and-non-english-character/m-p/32917#M17461</guid>
      <dc:creator>Joy</dc:creator>
      <dc:date>2013-02-05T23:28:53Z</dc:date>
    </item>
  </channel>
</rss>

