mirror of
https://github.com/php/php-src.git
synced 2024-12-02 22:34:55 +08:00
Treat non-ASCII characters as erroneous when converting ASCII text
This commit is contained in:
parent
8f6889b20d
commit
a416f938f3
@ -79,7 +79,12 @@ const struct mbfl_convert_vtbl vtbl_wchar_ascii = {
|
||||
*/
|
||||
int mbfl_filt_conv_ascii_wchar(int c, mbfl_convert_filter *filter)
|
||||
{
|
||||
return (*filter->output_function)(c, filter->data);
|
||||
if (c < 0x80) {
|
||||
(*filter->output_function)(c, filter->data);
|
||||
} else {
|
||||
(*filter->output_function)(c | MBFL_WCSGROUP_THROUGH, filter->data);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user