Skip to content
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

Conversation

@notbakaneko
Copy link
Collaborator

@notbakaneko 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 2 commits Apr 17, 2018
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
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
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants