On Tue, Nov 16, 2010 at 11:29:22AM +0100, Stephan Witt wrote: > Am 16.11.2010 um 09:53 schrieb Enrico Forestieri: > > > On Tue, Nov 16, 2010 at 07:56:55AM +0100, Stephan Witt wrote: > >> The attached patch for http://www.lyx.org/trac/ticket/7026 seems to be > >> correct. > > > > Maybe yes, maybe not. isdigit(c) tests whether c is one of 0,1,2,...,9 > > while iswdigit(wc) tests whether wc is a wide-character code representing > > a character of class "digit" in the program's current locale. > > So, they both return true for 0,1,2,...,9 but iswdigit() returns true also > > when isdigit() returns false. > > Yes, the only use of hasDigit() is to test if a word contains digits. > The spell checker wants to ignore words with digits. > Therefor the isdigit() is wrong for digits not represented by ascii 0..9. > So, I tend to say that iswdigit() is more correct for this task.
Maybe. You could check whether the crash with isdigit is due to the fact that a macro is being used instead of a function call by using #undef isdigit -- Enrico