[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: isblank
From: |
Bruno Haible |
Subject: |
Re: isblank |
Date: |
Wed, 29 Jan 2020 21:27:44 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; ) |
Paul Eggert wrote:
> * Gawk dfa.c doesn't use isblank, but instead defines its own is_blank
> that is hard-coded to the C locale. Isn't [[:blank:]] supposed to be
> locale-dependent?
'[[:blank:]]', when applied to wide characters, is surely locale and
OS dependent, yes. But...
> Or are you assuming that space and tab are the only
> blank characters in all single-byte locales?
This is assumption is justified by the fact that gnulib's test-isblank.c
succeeds on all platforms (as far as I know). It contains:
for (c = 0; c <= UCHAR_MAX; c++)
ASSERT (!isblank (c) == !(c == ' ' || c == '\t'));
Bruno