Categories


Archives


Recent Posts


Categories


More PHP Unicode Resources

astorm

Frustrated by Magento? Then you’ll love Commerce Bug, the must have debugging extension for anyone using Magento. Whether you’re just starting out or you’re a seasoned pro, Commerce Bug will save you and your team hours everyday. Grab a copy and start working with Magento instead of against it.

Updated for Magento 2! No Frills Magento Layout is the only Magento front end book you'll ever need. Get your copy today!

The main reason I stay on Twitter? I have a large enough follower count that useful information still comes at me, but not so large a follower count that it’s an overwhelming sh—tshow. Lists and judicious blocking also help.

Two additional useful bits of information came my way on practical steps for dealing with Unicode in PHP.

First, this talk (slides here) from Andreas Heigl goes much deeper than my surface level griping did on the various encoding standards involved and everything you need to be aware of if you want to care deeply about getting encoding right when you’re programming with PHP.

Second, the stand-alone symfony/string composer package from Symfony offers a number of classes that better model strings in PHP. even if you don’t end up using it the linked doc can teach you things.

Both these resources cover a unicode concept I ignored called grapheme clusters. Don’t panic — it’s not as complex as it sounds. My naive understanding of the concept is some languages and writing systems feature individual characters that have meaning, but then can be combined into a single character to form a different or more nuanced meaning. Unicode supports combining individual codepoints to create these new characters.

Copyright © Alan Storm 1975 – 2021 All Rights Reserved

Originally Posted: 14th February 2021