<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 19 Jun 2013 11:28:05 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Project: Patchwork-UTF8 - UTF8 Support for PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17458</guid>
      <link>http://www.phpdeveloper.org/news/17458</link>
      <description><![CDATA[<p>
<i>Nicolas Grekas</i> has shared another tool that he's pulled out of his "Patchwork" framework to make it a stand-alone tool: the <a href="https://github.com/nicolas-grekas/Patchwork-UTF8">Patchwork-UTF8 helper</a> that provides matching functions to those PHP already has for regular strings, but a little smarter to work with UTF8 correctly.
</p>
<blockquote>
The PatchworkUtf8 class implements the quasi complete set of string functions that need UTF-8 grapheme clusters awareness. These functions are all static methods of the PatchworkUtf8 class. The best way to use them is to add a use PatchworkUtf8 as u; at the beginning of your files, then when UTF-8 awareness is required, prefix by u:: when calling them.
</blockquote>
<p>
In <a href="https://github.com/nicolas-grekas/Patchwork-UTF8/blob/master/README.md">the README</a> for the tool he talks about the functions included in the current release that match PHP's string functions as well as some additional methods like "isUtf8", "bestFit" and "strtocasefold". It relies on the mbstring, iconv and intl extensions being installed, and if they aren't, it falls back to other functionality (list of those methods included).
</p>]]></description>
      <pubDate>Fri, 27 Jan 2012 11:38:40 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ahmed Shreef's Blog: iconv misunderstands UTF-16 strings with no BOM]]></title>
      <guid>http://www.phpdeveloper.org/news/15035</guid>
      <link>http://www.phpdeveloper.org/news/15035</link>
      <description><![CDATA[<p>
<i>Ahmed Shreef</i> has <a href="http://shreef.com/2010/08/iconv-misunderstands-utf-16-strings-with-no-bom/">a recent post</a> to his blog about an issue he had converting UTF-16 strings over to UTF-8 with the <a href="http://php.net/iconv">iconv</a> functionality in PHP. Specifically, he ended up with "rubbish unreadable characters" after the conversion.
</p>
<blockquote>
I had a problem last week with converting UTF-16 encoded strings to UTF-8 using PHP's iconv library on a Linux server. my code worked fine on my machine but the same code resulted in a rubbish unreadable characters on our production server.
</blockquote>
<p>
In his example (a basic "Hello World" in Arabic) he notes that there's no <a href="http://en.wikipedia.org/wiki/Byte-order_mark">byte order mark</a> on the string and, because of this, the iconv feature tries to guess if it's big-endian or little-endian. This guessing varies from machine to machine resulting in the inconsistencies he saw. The solution is to define the "to" and "from" for the conversion manually rather than letting it just guess.
</p>]]></description>
      <pubDate>Fri, 27 Aug 2010 13:36:56 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Yannick's Blog: mbstring vs iconv benchmarking]]></title>
      <guid>http://www.phpdeveloper.org/news/11153</guid>
      <link>http://www.phpdeveloper.org/news/11153</link>
      <description><![CDATA[<p>
Recently on his blog <i>Yannick</i> has done some benchmarking <a href="http://dokeoslead.wordpress.com/2008/10/05/mbstring-vs-iconv-benchmarking/">comparing mbstring and iconv</a> in PHP 5.2.4 release.
</p>
<blockquote>
Following up on <a href="http://dokeoslead.wordpress.com/2008/04/22/mbstring-vs-iconv/">my previous post</a> about the differences between the mbstring and iconv international characters libraries (which resulted in a tentative conclusion that nobody knew anything about those differences), and particularly the comments by <a href="http://www.entidi.it/">Nicola</a>, we have combined forces (mostly efforts from Nicola, actually) to provide you with a little benchmarking, if that can help you decide.
</blockquote>
<p>
His code for the test script is included (for you to gather your own results) and a full listing of his results comparing the effects of possible caching, running up to ten executions. You can download the text file that he ran the script on <a href="http://mirror3.mirrors.tds.net/pub/gutenberg.org/1/3/0/8/13083/13083-utf8.txt">here</a>.
</p>]]></description>
      <pubDate>Mon, 06 Oct 2008 12:50:20 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Dokeos Blog: mbstring vs iconv]]></title>
      <guid>http://www.phpdeveloper.org/news/10034</guid>
      <link>http://www.phpdeveloper.org/news/10034</link>
      <description><![CDATA[<p>
In <a href="http://dokeoslead.wordpress.com/2008/04/22/mbstring-vs-iconv/">this post</a> on the Dokeos blog, there's a comparison of the <a href="http://www.php.net/mbstring">mbstring</a> function and the <a href="http://php.net/iconv">iconv</a> library as it pertains to their use on multi-byte strings.
</p>
<blockquote>
I was wondering today why use mbstring rather than iconv in Dokeos, and honestly I didn't remember exactly why I had chosen mbstring in the past, but finding information about the *differences* between the two. [...] Searching a bit more, I found a <a href="http://www.nyphp.org/content/presentations/smallworld/April2006-nyphp-Presentation.ppt">PPT presentation</a> from Carlos Hoyos on Google.
</blockquote>
<p>
Essentially, it boils down to how the library is integrated - mbstring is bundled and iconv is pulled from an external source. So, if you're looking for maximum portability, he recommends mbstring.
</p>]]></description>
      <pubDate>Thu, 24 Apr 2008 11:18:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Riff Blog: Console encoding in PHP-GTK apps]]></title>
      <guid>http://www.phpdeveloper.org/news/6738</guid>
      <link>http://www.phpdeveloper.org/news/6738</link>
      <description><![CDATA[<p>
PHP-GTKers working in English-related applications, don't have a problem with debugging messages output to a console when debugging, but applications on a more international front have issues with their output. But help has been found in <a href="http://blog.riff.org/2006_11_19_console_encoding_in_php_gtk_apps">this new post</a> on the Riff Blog - a method for correctly encoding PHP-GTK applications.
</p>
<blockquote>
<p>
PHP scripts are typically stored under UTF-8 encoding to limit i18n headaches, while the console in which their output will be displayed is normally configured to some regional encoding, like IBM850 in Windows/XP French.
</p>
<p>
So we need a workaround...
</p>
</blockquote>
<p>
He splits <a href="http://blog.riff.org/2006_11_19_console_encoding_in_php_gtk_apps">the process</a> out into a few steps, each with its own explanation and code:
<ul>
<li>Builtin tools
<li>Buffering
<li>Flushing
<li>PHP-GTK is not PHP for the Web
<li>Auto-flushing
</ul>
All wrapped up with a final solution - using the iconv functionality in combination with some output buffering to correctly display the message.
</p>]]></description>
      <pubDate>Mon, 20 Nov 2006 10:58:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Christian Stocker's Blog: PHP 5, OS X, fink and iconv]]></title>
      <guid>http://www.phpdeveloper.org/news/4622</guid>
      <link>http://www.phpdeveloper.org/news/4622</link>
      <description><![CDATA[<i>Christian Stocker</i> has <a href="http://blog.bitflux.ch/archive/2006/01/06/php-5-os-x-fink-and-iconv.html">a quick new post</a> with a solution for those Mac users out there that would like to use the iconv extension with fink.
<p>
<quote>
<i>
If you want to get the iconv extension properly running with PHP 5 and <a href="http://fink.sf.net/">fink</a> on OS X, you need the following configure option
<p>
--with-iconv=/sw/
<p>
and then it should work.
<p>
Hope that helps others, too.
</i>
</quote>
<p>
And, apparently, it does - given the one comment below it so far that has a positive response...
]]></description>
      <pubDate>Fri, 06 Jan 2006 07:23:47 -0600</pubDate>
    </item>
  </channel>
</rss>
