Because Unicode support is hard, here's another PR. It also helps to understand how PHP handles UTF-8. All PREG-related functions in PHP will calculate string offsets in bytes and not character lengths; this causes problems because mb_* functions use character lengths.
This also means #88 will need to be reevaluated whenever I get a chance.
Because Unicode support is hard, here's another PR. It also helps to understand how PHP handles UTF-8. All PREG-related functions in PHP will calculate string offsets in bytes and not character lengths; this causes problems because
mb_*
functions use character lengths.This also means #88 will need to be reevaluated whenever I get a chance.
Reported in https://github.com/westonruter/syntax-highlighting-code-block/issues/400
/cc @westonruter