<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.iis.net/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/" xmlns:cs="http://blogs.iis.net/"><channel><title>Search results matching tags 'PHP' and 'Endian'</title><link>http://blogs.iis.net/search/SearchResults.aspx?o=DateDescending&amp;tag=PHP,Endian&amp;orTags=0</link><description>Search results matching tags 'PHP' and 'Endian'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Unicode Support and Endianness</title><link>http://blogs.iis.net/sqlphp/archive/2008/08/29/unicode-support-and-endianness.aspx</link><pubDate>Fri, 29 Aug 2008 23:12:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:3010653</guid><dc:creator>Anonymous</dc:creator><cs:applicationKey>sqlphp</cs:applicationKey><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></item></channel></rss>