Skip to content

More fixes for Unicode support#90

Merged
allejo merged 4 commits into
9.18from
hotfix/more-unicode
Jul 9, 2021
Merged

More fixes for Unicode support#90
allejo merged 4 commits into
9.18from
hotfix/more-unicode

Conversation

@allejo

@allejo allejo commented Jul 8, 2021

Copy link
Copy Markdown
Collaborator

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 westonruter/syntax-highlighting-code-block#400

/cc @westonruter

@allejo allejo force-pushed the hotfix/more-unicode branch 3 times, most recently from fea836f to c722387 Compare July 8, 2021 23:51
@allejo allejo force-pushed the hotfix/more-unicode branch from c722387 to 840113d Compare July 8, 2021 23:54
@allejo allejo merged commit 9cafee6 into 9.18 Jul 9, 2021
@allejo allejo deleted the hotfix/more-unicode branch July 9, 2021 00:03
@allejo allejo linked an issue Jul 9, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Highlighter duplicating Russian characters (unicode)

1 participant