<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Microsoft SQL Server Driver for PHP Team Blog : Endian</title><link>http://blogs.msdn.com/sqlphp/archive/tags/Endian/default.aspx</link><description>Tags: Endian</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Unicode Support and Endianness</title><link>http://blogs.msdn.com/sqlphp/archive/2008/08/29/unicode-support-and-endianness.aspx</link><pubDate>Sat, 30 Aug 2008 02:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8907304</guid><dc:creator>dpblogs</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/sqlphp/comments/8907304.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sqlphp/commentrss.aspx?PostID=8907304</wfw:commentRss><description>&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: red"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: black; mso-themecolor: text1"&gt;&lt;FONT size=3&gt;We’ve seen more activity on our MSDN Forum over the past couple weeks (yay!) and there have been a few threads about how/if the SQL Server Driver for PHP supports Unicode.&amp;nbsp; Rest assured, the SQL Server Driver for PHP does support Unicode.&amp;nbsp; The driver expects Unicode strings to be in little endian format, since that's what SQL Server uses.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;When you convert strings between different encodings in PHP using iconv or mb_convert_encoding, PHP will assume big endian format if you do not specify endianness.&amp;nbsp; In other words, you must specify "ucs-2le" instead of just "ucs-2".&amp;nbsp; The example in our documentation for working with UTF-8 strings did not specify endianness so the strings were converted to and from Unicode in big endian format.&amp;nbsp; We're in the process of correcting that error and apologize for the confusion.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;For more information on endianness and the origin of the term "endian", see &lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/michkap/archive/2005/02/09/369958.aspx" mce_href="http://blogs.msdn.com/michkap/archive/2005/02/09/369958.aspx"&gt;&lt;FONT face=Calibri size=3&gt;Michael Kaplan's blog post&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; or the &lt;/FONT&gt;&lt;A href="http://en.wikipedia.org/wiki/Endianness" mce_href="http://en.wikipedia.org/wiki/Endianness"&gt;&lt;FONT face=Calibri size=3&gt;Wikipedia entry on endianness&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;David Sceppa&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;Program Manager -&amp;nbsp;Microsoft SQL Server Driver for PHP&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8907304" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sqlphp/archive/tags/PHP/default.aspx">PHP</category><category domain="http://blogs.msdn.com/sqlphp/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.msdn.com/sqlphp/archive/tags/Unicode/default.aspx">Unicode</category><category domain="http://blogs.msdn.com/sqlphp/archive/tags/Endian/default.aspx">Endian</category></item></channel></rss>