summaryrefslogtreecommitdiff
path: root/main/php_memory_streams.h
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2017-08-03 21:53:21 +0200
committerNikita Popov <nikita.ppv@gmail.com>2017-08-03 21:53:59 +0200
commitfb9bf5b64b6c09b9d93bbd1dadd64884e0af66f3 (patch)
treed11785d671b4d6a35452bcfc5e05adeabfa18fdb /main/php_memory_streams.h
parenta8a9e93e9a902ffd4099e3ba2a7a269da09120c5 (diff)
downloadphp-git-fb9bf5b64b6c09b9d93bbd1dadd64884e0af66f3.tar.gz
Revert/fix substitution character fallback
The introduced checks were not correct in two respects: * It was checked whether the source encoding of the string matches the internal encoding, while the actually relevant encoding is the *target* encoding. * Even if the correct encoding is used, the checks are still too conservative. Just because something is not a "Unicode-encoding" does not mean that it does not map any non-ASCII characters. I've reverted the added checks and instead adjusted mbfl_convert to first try to use the provided substitution character and if that fails, perform the fallback to '?' at that point. This means that any codepoint mapped in the target encoding should now be correctly supported and anything else should fall back to '?'.
Diffstat (limited to 'main/php_memory_streams.h')
0 files changed, 0 insertions, 0 deletions