Normally I would just do this.
$str = preg_replace('#(\d+)#', ' $1 ', $str);
If I knew it was going to be utf-8 I would add a lowercase "u" modifier to the pattern and I think I would be good. But because of reports of utf-8 taking 2x and in some cases 3x the storage space than it would take if the native character set were used, I'm trying not to restrict the application to utf-8.
Thus, I'm trying to stay away from my favorite preg_ functions.
Most things have been fairly simple so far, but I'm a little stuck on replacements where I'd normally use character classes in preg_ such as "\d".