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

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 April 17, 2018 18:41
Should fix cases where json_encode fails due to strtolower deciding the
text is ascii.
@nanaya nanaya merged commit b23d675 into ppy:master Apr 17, 2018
@notbakaneko notbakaneko deleted the feature/markdown-processor-mb_strtolower branch April 23, 2018 10:03
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.

None yet

2 participants