summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorAlex Dowad <alexinbeijing@gmail.com>2021-01-13 21:28:50 +0200
committerAlex Dowad <alexinbeijing@gmail.com>2021-01-14 22:26:24 +0200
commit4d65c2a992e0301c4b0ec9b3c73b44ee2d7802df (patch)
treec63c09154c7f3535966307f4b8c52d765560f9f5 /ext/pcre/php_pcre.c
parentb4292284201eacad83b807dc1ac89e87d799badf (diff)
downloadphp-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