bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get isblank?


From: Reuben Thomas
Subject: Re: How to get isblank?
Date: Thu, 15 Oct 2009 12:48:24 +0100

2009/10/7 Eric Blake <address@hidden>:
> Can we add a summary of this logic to the isblank.texi documentation, to
> point people to better replacements?

Proposed patch:

diff --git a/doc/posix-functions/isblank.texi b/doc/posix-functions/isblank.texi
index 2547793..a4924c7 100644
--- a/doc/posix-functions/isblank.texi
+++ b/doc/posix-functions/isblank.texi
@@ -16,3 +16,14 @@ Portability problems not fixed by Gnulib:
 This function is missing on some platforms:
 AIX 4.3.2, IRIX 6.5, OSF/1 5.1, Solaris 9, mingw.
 @end itemize
+
+There is no module for isblank because, first, it has not often been
+requested, and secondly, on all known platforms, in all predefined
+locales, @code{isblank(c)} is probably equivalent to @code{(c == ' ' ||
+c == '\t')}. Look at the glibc definition (in
address@hidden/localedata/locales/i18n}): the "blank" characters are `\t',
+` ', U+1680, U+180E, U+2000 to U+2006, U+2008 to U+200A, U+205F, U+3000,
+and only the first two are present in a common 8-bit encoding. Hence,
+instead of using this function, with platform dependent semantics, most
+programs will either want the pure ASCII version (@code{c_isblank}) or
+the Unicode aware version (@code{uc_is_blank}).

-- 
http://rrt.sc3d.org
Psalms 19:12: tagline for the guilty




reply via email to

[Prev in Thread] Current Thread [Next in Thread]