Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Philipp Klaus Krause <pkk@spth.de> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Is wchar_t really useful? |
| Date | 2015-11-12 15:22 +0100 |
| Organization | solani.org |
| Message-ID | <n227bt$q5b$1@solani.org> (permalink) |
| References | <n1puh2$17n$1@solani.org> <n1q8v2$f03$1@dont-email.me> |
On 09.11.2015 15:03, James Kuyper wrote: > On 11/09/2015 06:02 AM, Philipp Klaus Krause wrote: >> The C standard has wchar_t. But I don't really see any advantage over >> char. Maybe if __STDC_ISO_10646__ is defined. But even then, I guess >> char, char16_t and char32_t are more useful. >> Is there a point in using wchar_t? > > Many (most?) of the C standard library routines that take or return > char* arguments are defined as interpreting those pointers as pointing > to a multibyte character string (MBCS). If it were up to me, there'd be > one term "single byte character" referring to a single char object that > can represent a character, while "multibyte character" would refer only > to sequences of two or more char objects that together represent a > single character. The committee took a different approach, defining the > term "multibyte character" to include both of those categories (3.7.2p1). > > Wide character strings, on the other hand, can represent any character > in the current locale using a single wchar_t object. Does that mean than an implementation that can work with all of Unicode as multibyte characters needs to have a wchar_t big enough to hold each one of them? I guess a way to weasel out would be to define only the basic multilingual plane as the supported extended character set, make wchar_t 16 bits, and declare that all of unicode just works with char, char16_t, char32_t as implementation-defined behaviour? Or just do the same with the basic character set as extended set, and make wchar_t 8 bits? Philipp
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Is wchar_t really useful? Philipp Klaus Krause <pkk@spth.de> - 2015-11-09 12:02 +0100
Re: Is wchar_t really useful? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-09 03:24 -0800
Re: Is wchar_t really useful? Stephen Sprunk <stephen@sprunk.org> - 2015-11-10 18:33 -0600
Re: Is wchar_t really useful? Ian Collins <ian-news@hotmail.com> - 2015-11-11 13:56 +1300
Re: Is wchar_t really useful? James Kuyper <jameskuyper@verizon.net> - 2015-11-09 09:03 -0500
Re: Is wchar_t really useful? Philipp Klaus Krause <pkk@spth.de> - 2015-11-12 15:22 +0100
Re: Is wchar_t really useful? James Kuyper <jameskuyper@verizon.net> - 2015-11-12 10:04 -0500
Re: Is wchar_t really useful? Philipp Klaus Krause <pkk@spth.de> - 2015-11-12 16:44 +0100
Re: Is wchar_t really useful? James Kuyper <jameskuyper@verizon.net> - 2015-11-12 11:29 -0500
Re: Is wchar_t really useful? supercat@casperkitty.com - 2015-11-12 09:14 -0800
Re: Is wchar_t really useful? Tim Rentsch <txr@alumni.caltech.edu> - 2015-11-14 11:50 -0800
Re: Is wchar_t really useful? supercat@casperkitty.com - 2015-11-15 13:44 -0800
Re: Is wchar_t really useful? Philipp Klaus Krause <pkk@spth.de> - 2015-11-15 22:50 +0100
Re: Is wchar_t really useful? supercat@casperkitty.com - 2015-11-15 14:46 -0800
Re: Is wchar_t really useful? raltbos@xs4all.nl (Richard Bos) - 2015-11-17 22:34 +0000
Re: Is wchar_t really useful? Tim Rentsch <txr@alumni.caltech.edu> - 2015-11-16 07:25 -0800
Re: Is wchar_t really useful? Philipp Klaus Krause <pkk@spth.de> - 2015-11-13 17:26 +0100
Re: Is wchar_t really useful? James Kuyper <jameskuyper@verizon.net> - 2015-11-13 13:36 -0500
Re: Is wchar_t really useful? Stephen Sprunk <stephen@sprunk.org> - 2015-11-13 16:37 -0600
Re: Is wchar_t really useful? James Kuyper <jameskuyper@verizon.net> - 2015-11-13 17:58 -0500
Re: Is wchar_t really useful? Stephen Sprunk <stephen@sprunk.org> - 2015-11-13 16:01 -0600
Re: Is wchar_t really useful? Philipp Klaus Krause <pkk@spth.de> - 2015-11-13 23:36 +0100
Re: Is wchar_t really useful? Philipp Klaus Krause <pkk@spth.de> - 2015-11-12 15:28 +0100
Re: Is wchar_t really useful? James Kuyper <jameskuyper@verizon.net> - 2015-11-12 10:26 -0500
Re: Is wchar_t really useful? Stephen Sprunk <stephen@sprunk.org> - 2015-11-12 14:27 -0600
Re: Is wchar_t really useful? Lőrinczy Zsigmond <nospam@for.me> - 2015-11-13 05:02 +0100
Re: Is wchar_t really useful? Philipp Klaus Krause <pkk@spth.de> - 2015-11-13 11:52 +0100
Re: Is wchar_t really useful? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-13 05:17 -0800
Re: Is wchar_t really useful? Stephen Sprunk <stephen@sprunk.org> - 2015-11-13 12:58 -0600
Re: Is wchar_t really useful? supercat@casperkitty.com - 2015-11-13 11:14 -0800
Re: Is wchar_t really useful? Stephen Sprunk <stephen@sprunk.org> - 2015-11-13 12:45 -0600
Re: Is wchar_t really useful? Philipp Klaus Krause <pkk@spth.de> - 2015-11-13 18:24 +0100
Re: Is wchar_t really useful? James Kuyper <jameskuyper@verizon.net> - 2015-11-13 13:55 -0500
Re: Is wchar_t really useful? Philipp Klaus Krause <pkk@spth.de> - 2015-11-13 20:39 +0100
Re: Is wchar_t really useful? James Kuyper <jameskuyper@verizon.net> - 2015-11-13 14:54 -0500
Re: Is wchar_t really useful? Stephen Sprunk <stephen@sprunk.org> - 2015-11-13 17:04 -0600
csiph-web