multi-byte manipulation in php: ord, iconv, mbstring
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


is there an equivelent to setting the ’setCharsetHandler’ mode in Zend_AMF? Probably the wrong place to ask, sorry.
@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!