-
Notifications
You must be signed in to change notification settings - Fork 7.8k
mb_convert_kana is broken in PHP8.2.0 #10174
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
Comments
Since PHP 8.2 it now does a
Therefore, |
This check has been introduced with dcaa010. @alexdowad, can you please check this issue? |
Thanks for the report. You are right that Will fix ASAP. |
Any other feedback on which combinations of flags for We want to avoid:
|
alexdowad
added a commit
to alexdowad/php-src
that referenced
this issue
Dec 28, 2022
The 'h' flag makes mb_convert_kana convert zenkaku hiragana to hankaku katakana; 'k' makes it convert zenkaku katakana to hankaku katakana. When working on the implementation of mb_convert_kana, I added some additional checks to catch combinations of flags which do not make sense; but there is no conflict between 'h' and 'k' (they control conversions for two disjoint ranges of codepoints) and this combination should not have been restricted. Thanks to the GitHub user 'akira345' for reporting this problem. Closes phpGH-10174.
alexdowad
added a commit
to alexdowad/php-src
that referenced
this issue
Dec 29, 2022
The 'h' flag makes mb_convert_kana convert zenkaku hiragana to hankaku katakana; 'k' makes it convert zenkaku katakana to hankaku katakana. When working on the implementation of mb_convert_kana, I added some additional checks to catch combinations of flags which do not make sense; but there is no conflict between 'h' and 'k' (they control conversions for two disjoint ranges of codepoints) and this combination should not have been restricted. Thanks to the GitHub user 'akira345' for reporting this problem. Closes phpGH-10174.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
mb_convert_kana is broken in PHP8.2.0.
The code below works fine in PHP8.1.13, but returns
Fatal error: Uncaught ValueError: mb_convert_kana(): Argument #2 ($mode) must not combine 'h' and 'k' flags
in PHP8.2.0.The following code:
Resulted in this output:
But I expected this output instead:
PHP Version
PHP 8.2.0
Operating System
Debian GNU/Linux 11
The text was updated successfully, but these errors were encountered: