New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use mb_strtolower in OsuMarkdownProcessor. #3025

Merged
merged 3 commits into from Apr 17, 2018

Conversation

2 participants
@notbakaneko
Contributor

notbakaneko commented Apr 17, 2018

Should fix cases where json_encode fails due to strtolower deciding the text is ascii.
Also less environment dependent ಠ_ಠ

>>> strtolower('かなAAmĄkA')
=> b"ÒüïÒü¬aamõäka"
>>> mb_strtolower('かなAAmĄkA')
=> "かなaamąka"

>> strtolower('欢迎来到')
=> "欢迎来到"
>>> mb_strtolower('欢迎来到')
=> "欢迎来到"
>>> strtolower('欢迎来到Ą')
=> b"µ¼óÞ┐ĵØÑÕê░õä"
>>> mb_strtolower('欢迎来到Ą')
=> "欢迎来到ą"

notbakaneko and others added some commits Apr 17, 2018

use mb_strtolower instead.
Should fix cases where json_encode fails due to strtolower deciding the
text is ascii.
@nanaya

nanaya approved these changes Apr 17, 2018

@nanaya nanaya merged commit b23d675 into ppy:master Apr 17, 2018

2 checks passed

continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@notbakaneko notbakaneko deleted the notbakaneko:feature/markdown-processor-mb_strtolower branch Apr 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment