-
Notifications
You must be signed in to change notification settings - Fork 7.8k
mb_convert_encoding "\" (backslash) and "~" (tilde) BC breaks to Shift_JIS-2004 #9528
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
And I think we should fix it like that. @alexdowad, what do you think? |
@cmb69 Agreed. |
@youkidearitai Are you aware of any other Shift-JIS-2004 mappings which have changed? In this case, your concern is just about Unicode -> JIS mappings, not JIS -> Unicode, is that correct? |
@alexdowad Thanks for reply.
Sorry, I'm not know any changed Shift_JIS-2004 in PHP, But Shift_JIS-2004 is upper compatible of Shift_JIS that normally no any changes.
Yes this case I concern Unicode -> JIS mappings it is. |
@youkidearitai Thanks. Hopefully I might prepare a PR later today... Thanks again. |
In 0d0029d and 315d48b, I changed the mappings used for Unicode to Shift-JIS-2004, in an attempt to follow the JISC specification more closely. However, feedback from Japanese PHP users indicates that most users of SJIS-2004 expect 0x5C and 0x7E to be treated as equivalent to the same ASCII bytes. This is due to a long history of non-complying implementations which then became a de-facto standard. Therefore, restore the earlier mappings for U+005C and U+007E. Thanks to the GitHub user 'youkidearitai' for reporting this issue. Fixes phpGH-9528.
Description
The following code:
Resulted in this output:
But I expected this output instead:
Similar to #8281 . This behavior is from 5.4 to 8.0 (3v4l: https://3v4l.org/42pAL ). Please keep to Backward Compatible for PHP 8.1.
PHP Version
PHP 8.1.x
Operating System
No response
The text was updated successfully, but these errors were encountered: