diff options
author | Alex Dowad <alexinbeijing@gmail.com> | 2021-01-13 21:28:50 +0200 |
---|---|---|
committer | Alex Dowad <alexinbeijing@gmail.com> | 2021-01-14 22:26:24 +0200 |
commit | 4d65c2a992e0301c4b0ec9b3c73b44ee2d7802df (patch) | |
tree | c63c09154c7f3535966307f4b8c52d765560f9f5 /ext/pcre/php_pcre.c | |
parent | b4292284201eacad83b807dc1ac89e87d799badf (diff) | |
download | php-git-4d65c2a992e0301c4b0ec9b3c73b44ee2d7802df.tar.gz |
ISO-2022-JP-2004 conversion: represent backslash and tilde as ASCII
This issue dates back to some commits I merged recently, which made encodings
like Shift-JIS-2004 use appropriate JIS X 0208 characters to represent
backslashes and tildes, rather than single-byte characters which are used in
those encodings with a different meaning (for example, in these encodings,
0x5C is used for a halfwidth Yen sign, rather than a backslash).
There was an unintended side effect: ISO-2022-JP-2004 was also made to
represent backslashes and tildes using JIS X 0208 characters. However,
ISO-2022-JP explicitly includes ASCII as one of its selectable character sets,
and ISO-2022-JP-2004 is just an extension of ISO-2022-JP. So when converting
text to ISO-2022-JP-2004, we can convert Unicode backslashes and tildes to ASCII
rather than using the corresponding JIS X 0208 characters.
Diffstat (limited to 'ext/pcre/php_pcre.c')
0 files changed, 0 insertions, 0 deletions