<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Tue, 09 Jun 2026 22:08:09 +0000</lastBuildDate>
    <item>
      <title>(PHP) UTF-8 to UCS-2 SMS - etangle</title>
      <link>https://snipplr.com/view/27069/utf8-to-ucs2-sms</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 26 Jan 2010 00:51:10 UTC</pubDate>
      <guid>https://snipplr.com/view/27069/utf8-to-ucs2-sms</guid>
    </item>
    <item>
      <title>(PHP) UCS2/HexEncoded characters to UTF8 in php - etangle</title>
      <link>https://snipplr.com/view/27068/ucs2hexencoded-characters-to-utf8-in-php</link>
      <description>&lt;p&gt;You can recompose a Hex-representation by converting the hexadecimal chars with hexdec(), repacking the component chars, and then using mb_convert_encoding() to convert from UCS-2 into UTF-8. As I mentioned in my answer to your other question, you'll still need to be careful with the output encoding, although here you've specifically requested UTF-8, so we'll use that for the upcoming sample.&#13;
&#13;
Here's a sample that does the work of converting UCS-2 in Hex to UTF-8 in native string form. As PHP currently doesn't ship with a hex2bin() function, which would make things very easy, we'll use the one posted at the reference link at the end. I've renamed it to *local_hex2bin()* just in case it conflicts with a future version of PHP or with a definition in some other 3rd party code that you include in your project.&#13;
&#13;
Locally, I called this sample page UCS2HexToUTF8.php, and then used a querystring to set the output.&#13;
&#13;
UCS2HexToUTF8.php?06450631062d0628064b06270020063906270644064500200021&lt;/p&gt;</description>
      <pubDate>Tue, 26 Jan 2010 00:35:36 UTC</pubDate>
      <guid>https://snipplr.com/view/27068/ucs2hexencoded-characters-to-utf8-in-php</guid>
    </item>
    <item>
      <title>(PHP) Converting hex to string - etangle</title>
      <link>https://snipplr.com/view/26896/converting-hex-to-string</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 23 Jan 2010 00:22:04 UTC</pubDate>
      <guid>https://snipplr.com/view/26896/converting-hex-to-string</guid>
    </item>
    <item>
      <title>(PHP) Converting string to hex - etangle</title>
      <link>https://snipplr.com/view/26895/converting-string-to-hex</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 23 Jan 2010 00:20:56 UTC</pubDate>
      <guid>https://snipplr.com/view/26895/converting-string-to-hex</guid>
    </item>
  </channel>
</rss>
