Home > AMFPHP, Flash Platform, Zend_Amf > multi-byte manipulation in php: ord, iconv, mbstring

multi-byte manipulation in php: ord, iconv, mbstring

June 29th, 2008

Working on optimizations for AMF serialization and I want to finalize on just using the default ord function or actually using one of the fancier libraries such as mbstring or iconv. However I am not able to find very much information on what is the preferred library to code against. Surfing google shows that “everyone” likes iconv as it is almost always there on linux but suggest that mbstring is more portable? However there does not seem to be any suggestion as to what new developers should code against. I really like the additional methods that iconv and mbstring provide and both suggest optimizations although I would have to write my own tests to prove any optimizations. Can anyone lead me to some more detailed information on what the community wants to adopt?

– Update: ICONV it is! –

“mbstring offers better support and more options. However, it’s not enabled in vanilla PHP installs — whereas iconv _is_. So, for that reason, we typically recommend utilizing iconv. (I actually switched from using mbstring to iconv in Zend_XmlRpc for this reason.)”

Matthew Weier O’Phinney
Software Architect
Zend Framework      

AMFPHP, Flash Platform, Zend_Amf

  1. Ken
    February 6th, 2009 at 15:07 | #1

    is there an equivelent to setting the ’setCharsetHandler’ mode in Zend_AMF? Probably the wrong place to ask, sorry.

  2. February 6th, 2009 at 17:23 | #2

    @ken Wondering what you are using it for? The hope is that we are going to force Unicode in php 5.3 but no effort has been started. If this is a deal breaker please open a bug/feature request!

  1. No trackbacks yet.