Re: Get ASCII value for character when higher than 127
- From: peter koch <peter.koch.larsen@xxxxxxxxx>
- Date: 27 May 2007 22:39:50 -0700
On 26 Maj, 21:12, "Jochen Kalmbach [MVP]" <nospam-
Jochen.Kalmb...@xxxxxxxxx> wrote:
Hi peter!
Ascii characters *never* contain values > 127!
Is this so? At least there is an option so you can choose between
having char signed or unsigned. So far as I remember, the C++ standard
has no requirement as the signedness of char.
C++ standard does not define ascii characters!
ISO defines ASCII which is in range 0x01 - 0x7f.
While I do agree with you on this point, if you read the OP, you must
surely agree with me that the poster used the phrase "ASCII" in the
sense of the current 8-bit codepage. This is technically incorrect,
but very common and can probably be found also in Microsoft
documentation.
It does not matter if you use char, int, short wchar_t or whatever...
ascii will never contains such numbers outside of this range.
If it contains such numbers, then you do not have ascii.
Of course. But the OP used a char to store "ASCII"-characters and
obviously had problems when those chars were negative.
/Peter
.
- References:
- Get ASCII value for character when higher than 127
- From: ssetz
- Re: Get ASCII value for character when higher than 127
- From: Jochen Kalmbach [MVP]
- Re: Get ASCII value for character when higher than 127
- From: peter koch
- Re: Get ASCII value for character when higher than 127
- From: Jochen Kalmbach [MVP]
- Get ASCII value for character when higher than 127
- Prev by Date: Re: replace __ftol MSVC6
- Next by Date: Re: LoadLibrary call hangs ..sometime
- Previous by thread: Re: Get ASCII value for character when higher than 127
- Next by thread: Re: Get ASCII value for character when higher than 127
- Index(es):
Relevant Pages
|