c++ - ctype.h
- John Jameson (6/6) Mar 14 2007 The ctype functions isspace() and friends are unaware of whether
- Bertel Brander (7/14) Mar 14 2007 You should cast the argument to the macros/functions in ctype.h
The ctype functions isspace() and friends are unaware of whether
the compiler is set to treat chars as signed or unsigned. So things
like isspace('µ') produce random results depending on what is in
memory before the _pctype array.
Should ALL the macros in ctype.h cast to unsigned char? Curiously,
the isleadbyte() macro already does.
Mar 14 2007
John Jameson skrev:
The ctype functions isspace() and friends are unaware of whether
the compiler is set to treat chars as signed or unsigned. So things
like isspace('�') produce random results depending on what is in
memory before the _pctype array.
Should ALL the macros in ctype.h cast to unsigned char? Curiously,
the isleadbyte() macro already does.
You should cast the argument to the macros/functions in ctype.h
to unsigned.
--
Just another homepage:
http://damb.dk
But it's mine - Bertel
Mar 14 2007








Bertel Brander <bertel post4.tele.dk>