Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: what is the difference between these statement |
| Date | 2012-05-10 11:47 -0700 |
| Organization | None to speak of |
| Message-ID | <lnpqabna9c.fsf@nuthaus.mib.org> (permalink) |
| References | <05e9a565-918a-4058-a323-7cdaa921ab41@qg3g2000pbc.googlegroups.com> <877gwowjr8.fsf@temporary-address.org.uk> <0.642417b790b5321e8920.20120507124410BST.87pqagfc6t.fsf@bsb.me.uk> <87k40lucf6.fsf@temporary-address.org.uk> <jogutv$kfo$1@reader1.panix.com> |
jgk@panix.com (Joe keane) writes:
> In article <87k40lucf6.fsf@temporary-address.org.uk>,
> Dr Nick <3-nospam@temporary-address.org.uk> wrote:
>>Except in a pathological case where EOF cast to unsigned char turns into
>>a space character I suppose - could that actually happen?
>
> Why not? There are codes where blank is zero. One can easily imagine
> 0x100 for a value of EOF (especially 8-bit machines). Even if there is
> null and space, do we know that 'isspace' is false for null?
C can't use an encoding where ' ' == '\0'; the null character has to be
distinct from any other character value.
(The only such encoding I'm aware of is the one for Knuth's MIX
processor; I'm sure there have been others, but presumably they're all
obsolete.)
The GSM 7-bit and 8-bit character encodings
<http://en.wikipedia.org/wiki/GSM_03.38> use 0x00 for '@'; '@' isn't
part of C's basic character set, but still I presume that software that
deals with it can't use C's string functions to process it.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
what is the difference between these statement ashu <ashishmourya21@gmail.com> - 2012-05-06 04:11 -0700
Re: what is the difference between these statement Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-05-06 12:29 +0100
Re: what is the difference between these statement ashu <ashishmourya21@gmail.com> - 2012-05-06 07:56 -0700
Re: what is the difference between these statement ashu <ashishmourya21@gmail.com> - 2012-05-06 08:01 -0700
Re: what is the difference between these statement Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-05-06 18:54 +0100
Re: what is the difference between these statement Dr Nick <3-nospam@temporary-address.org.uk> - 2012-05-06 15:39 +0100
Re: what is the difference between these statement Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-05-06 18:32 +0100
Re: what is the difference between these statement Dr Nick <3-nospam@temporary-address.org.uk> - 2012-05-06 19:23 +0100
Re: what is the difference between these statement Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-05-06 22:52 +0100
Re: what is the difference between these statement Dr Nick <3-nospam@temporary-address.org.uk> - 2012-05-07 08:08 +0100
Re: what is the difference between these statement Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-05-07 12:44 +0100
Re: what is the difference between these statement Dr Nick <3-nospam@temporary-address.org.uk> - 2012-05-09 06:54 +0100
Re: what is the difference between these statement James Kuyper <jameskuyper@verizon.net> - 2012-05-09 07:46 -0400
Re: what is the difference between these statement Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-05-09 15:32 +0100
Re: what is the difference between these statement Tim Rentsch <txr@alumni.caltech.edu> - 2012-05-09 12:02 -0700
Re: what is the difference between these statement jgk@panix.com (Joe keane) - 2012-05-10 17:46 +0000
Re: what is the difference between these statement Keith Thompson <kst-u@mib.org> - 2012-05-10 11:47 -0700
Re: what is the difference between these statement Tim Rentsch <txr@alumni.caltech.edu> - 2012-05-11 08:55 -0700
Re: what is the difference between these statement jgk@panix.com (Joe keane) - 2012-05-13 20:09 +0000
Re: what is the difference between these statement Kaz Kylheku <kaz@kylheku.com> - 2012-05-13 23:24 +0000
Re: what is the difference between these statement Tim Rentsch <txr@alumni.caltech.edu> - 2012-05-14 11:46 -0700
csiph-web