Am Sonntag, 3. September 2006 15:30 schrieb Abdelrazak Younes: > Question first: std::tolower() is a template and compiles fine with > char_type.
??? std::tolower comes from the C library (ctype.h) and is defined like this: int tolower(int); > The cast is not useful here as the test above ensure that the > argument is 8-bit ascii. Question is: is the test really necessary? The function is not correct with or without the test. > Should we trust std::lower() to do the right thing with unicode char? No, since the result of std::tolower depends on the current locale. I guess you know by now that I prefer to not touch these functions and let the compiler gerenate warnings for wrong argument types unless the function is implemented correctly for unicode. Georg
