Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #2204

Re: Is char obsolete?

From Florian Weimer <fw@deneb.enyo.de>
Newsgroups comp.lang.c
Subject Re: Is char obsolete?
Date 2011-04-08 23:07 +0200
Message-ID <87tye8cv0m.fsf@mid.deneb.enyo.de> (permalink)
References <inn180$1e3$1@oravannahka.helsinki.fi>

Show all headers | View raw


* Lauri Alanko:

> But nowadays Unicode is everywhere, and the de facto standard
> encoding is UTF-8.

It's not on Windows, where UTF-16 is pervasive, or with Java.  Some
other platforms have been infected by that, too.

> And in those rare situations where one can still assume
> that all the world is ASCII (or Latin-1, or even EBCDIC), there
> is still no benefit to using char over unsigned char. Apart from
> legacy library APIs, of course.

Even when restricting yourself to GNU/Linux platforms, the signedness
of the char type is not consistent across architectures.  So char
seems rather unusable indeed.

I use char * and especially const char * to denote zero-terminated
strings and unsigned char * for arbitrary binary blobs (usually
combined with an explicit length).  But that's probably just an odd
personal preference.

Back to comp.lang.c | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Is char obsolete? Lauri Alanko <la@iki.fi> - 2011-04-08 13:06 +0000
  Re: Is char obsolete? Chris H <chris@phaedsys.org> - 2011-04-08 14:55 +0100
  Re: Is char obsolete? Thomas Richter <thor@math.tu-berlin.de> - 2011-04-08 17:04 +0200
    Re: Is char obsolete? Chris H <chris@phaedsys.org> - 2011-04-08 16:32 +0100
      Re: Is char obsolete? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-04-08 17:02 +0100
      Re: Is char obsolete? Thomas Richter <thor@math.tu-berlin.de> - 2011-04-09 21:57 +0200
        Re: Is char obsolete? James Kuyper <jameskuyper@verizon.net> - 2011-04-09 16:47 -0400
          Re: Is char obsolete? William Ahern <william@wilbur.25thandClement.com> - 2011-04-09 15:10 -0700
            Re: Is char obsolete? James Kuyper <jameskuyper@verizon.net> - 2011-04-09 18:44 -0400
  Re: Is char obsolete? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-04-08 16:13 +0100
    Re: Is char obsolete? Keith Thompson <kst-u@mib.org> - 2011-04-08 12:55 -0700
      Re: Is char obsolete? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-04-08 22:16 +0100
  Re: Is char obsolete? Lauri Alanko <la@iki.fi> - 2011-04-08 17:04 +0000
    Re: Is char obsolete? Nobody <nobody@nowhere.com> - 2011-04-08 20:10 +0100
      Re: Is char obsolete? "robertwessel2@yahoo.com" <robertwessel2@yahoo.com> - 2011-04-08 15:43 -0700
        Re: Is char obsolete? Nobody <nobody@nowhere.com> - 2011-04-09 22:44 +0100
    Re: Is char obsolete? "BartC" <bc@freeuk.com> - 2011-04-08 21:04 +0100
      Re: Is char obsolete? William Ahern <william@wilbur.25thandClement.com> - 2011-04-08 15:01 -0700
        Re: Is char obsolete? Lauri Alanko <la@iki.fi> - 2011-04-09 14:27 +0000
          Re: Is char obsolete? "BartC" <bc@freeuk.com> - 2011-04-09 19:14 +0100
          Re: Is char obsolete? William Ahern <william@wilbur.25thandClement.com> - 2011-04-09 12:02 -0700
    Re: Is char obsolete? Ian Collins <ian-news@hotmail.com> - 2011-04-09 09:40 +1200
  Re: Is char obsolete? Florian Weimer <fw@deneb.enyo.de> - 2011-04-08 23:07 +0200

csiph-web