mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
cut: optimize -d '?' in UTF-8 case
ensure all ascii delims are processed with byte search in UTF-8
This commit is contained in:
1 parent
f6b3055f74
commit
2a6b36ff5b
1 file changed
+4
-1
@@ -315,8 +315,11 @@ utf8_field_delim_ok (void)
|
||||
static inline bool
|
||||
bytesearch_field_delim_ok (void)
|
||||
{
|
||||
unsigned char delim_0 = delim_bytes[0];
|
||||
|
||||
return (delim_length == 1
|
||||
? MB_CUR_MAX <= 1 || to_uchar (delim_bytes[0]) < 0x30
|
||||
? (MB_CUR_MAX <= 1
|
||||
|| (is_utf8_charset () ? delim_0 < 0x80 : delim_0 < 0x30))
|
||||
: utf8_field_delim_ok ());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user