summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorAlex Dowad <alexinbeijing@gmail.com>2020-09-19 16:26:04 +0200
committerAlex Dowad <alexinbeijing@gmail.com>2021-01-14 22:26:24 +0200
commitc11e12ffe001dd7f4a57c39a8ebd5de48a72cb42 (patch)
tree7096961946e4dab342df36497cd5d3fff9168fe0 /ext/pcre/php_pcre.c
parent4b95fdf2cac7269a38d035141e7321a295e19b29 (diff)
downloadphp-git-c11e12ffe001dd7f4a57c39a8ebd5de48a72cb42.tar.gz
Add comment explaining why ISO-2022-JP-2004, etc strings end with ESC ( B
These encodings have multiple modes which can be selected via escape sequences. The default starting mode is ASCII. If a string _ends_ in a different mode, we emit a 'redundant' escape sequence to switch back to ASCII. If the resulting string is never concatenated with other strings, that extra escape sequence serves no purpose. But if the resulting string is concatenated with other strings of the same encoding, it ensures that the resulting string will be valid.
Diffstat (limited to 'ext/pcre/php_pcre.c')
0 files changed, 0 insertions, 0 deletions