On Sat, May 29, 2010 at 9:13 AM, Tatsuo Ishii <ishii@postgresql.org> wrote:
> ! #define iswordchr(c) (lc_ctype_is_c()? \
> ! ((*(c) & 0x80)? !t_isspace(c) : (t_isalpha(c) ||
t_isdigit(c))): \
>
Surely isspace(c) will always be false for non-ascii characters in C locale?
Now it might be sensible to just treat any non-ascii character as a
word-character in addition to alpha and digits, so what might make
sense is
t_isalpha(c) || t_isdigit(c)) || (lc_ctype_is_c() && *(c)&0x80)
Though I wonder whether it wouldn't be generally more useful to users
to provide the non-space version as an option. I could see that being
useful for people in other circumstances aside from working around
this locale problem.
--
greg