Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Message-ID | <p6d478-egg.ln1@wilbur.25thandClement.com> (permalink) |
|---|---|
| From | William Ahern <william@wilbur.25thandClement.com> |
| Subject | Re: Is char obsolete? |
| Newsgroups | comp.lang.c |
| References | <inn180$1e3$1@oravannahka.helsinki.fi> <innf6e$5v5$1@oravannahka.helsinki.fi> <bUJnp.3444$Y71.2284@newsfe17.ams2> |
| Date | 2011-04-08 15:01 -0700 |
BartC <bc@freeuk.com> wrote: > "Lauri Alanko" <la@iki.fi> wrote in message news:innf6e$5v5$1@oravannahka.helsinki.fi... <snip> > > But I'm saying that nowadays the basic execution character set no > > longer suffices for general-purpose text manipulation. So > > wherever you need to manipulate an individual character as a > > character, you'd better use wchar_t or similar. > To do unicode properly, I don't think it's just a question of using a > slightly wider type; you'll probably be using extra libraries anyway. All wider types do is obscure the problem. The OP should sit down with a book on Unicode and learn the difference between abstract characters, combining characters, code points, graphemes, grapheme clusters, etc. Once one realizes that no type could be wide enough to allow simplistic indexing of strings--as linear arrays--then it becomes much easier to content oneself with char. And that's ignoring all the other complex issues. The more complex the operations one wants to do on the string--such as word splitting--the more useless wider types become by themselves, conceptually. Perl 6 comes the closest, AFAIU, to addressing the complexity of Unicode by inventing it's own normalization form, "NFG". At runtime it builds a "grapheme table" mapping new code points to irreducible sets of Unicode code points so that strings can be indexed with sensible results. Basically, Perl 6 handles Unicode not merely by increasing the integral width, but by implementing strings in two dimensions. Perl 6 also has special Unicode operators for complex string operations.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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