Am Sonntag, 3. September 2006 15:56 schrieb Abdelrazak Younes:
> Georg Baum wrote:
> > 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);
> 
> MSVC doc says:
> 
> Converts a character to upper case.
> 
> 
> template<Class CharType>
>     CharType toupper(
>        CharType _Ch,
>        const locale& _Loc
>     )

That is a different beast with two arguments ;-) Maybe we could use this 
instead with a suitable locale.
 
> I prefer to fix the warning a put a FIXME to document our current 
> understanding:
> 
> // FIXME for lowercase() and uppercase() function below:
> // 1) std::tolower() and std::toupper() are templates that
> // compile fine with char_type. With the test (c >= 256) we
> // do not trust these function to do the right thing with
> // unicode char.
> // 2) these functions use the current locale, which is wrong
> // if it is not latin1 based (latin1 is a subset of UCS4).
> 
> 
> That's a matter of taste I guess ;-)

Yep. Therefore I am not going to stop you from doing this.


Georg

Reply via email to