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


Groups > comp.lang.c > #73720

Re: How to get a character consisting of multiple bytes into a string literal?

From James Kuyper <jameskuyper@verizon.net>
Newsgroups comp.lang.c
Subject Re: How to get a character consisting of multiple bytes into a string literal?
Date 2015-10-24 15:05 -0400
Organization Self
Message-ID <562BD669.9070404@verizon.net> (permalink)
References <n0gehd$p8k$1@solani.org> <562BC8B3.2020606@verizon.net> <n0gj9c$b2t$1@solani.org>

Show all headers | View raw


On 10/24/2015 02:39 PM, Philipp Klaus Krause wrote:
> On 24.10.2015 20:06, James Kuyper wrote:
> 
>> "The source character set may contain multibyte characters, used to
>> represent members of the extended character set. The execution character
>> set may also contain multibyte characters, ..." (5.2.1.2p1). Note the
>> use of the word "may" - a conforming implementation need not have any
>> such characters, in either the source or execution character sets.
> 
> That verse from the C11 standard seems like a mistake to me. Elsewhere
> in the standard, anything is a multibyte character, with the character
> being exactly one byte being just a special case of a multibyte character.

You're correct, 3.7.2 defines "multibyte character" as including
characters that can be represented using only one byte. However, using
that interpretation in this context only makes 5.2.1.2p1 support my
conclusion even more strongly: it means that the source character set
need not even have single-byte characters capable of representing
members of the extended character set - something that seems obvious
simply by comparing the definitions of the two character sets.

Personally, I believe that 5.2.1.2p1 is using "multibyte character" to
referring specifically to characters that require more than one byte to
represent them. However, I won't insist on that interpretation.

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


Thread

How to get a character consisting of multiple bytes into a string literal? Philipp Klaus Krause <pkk@spth.de> - 2015-10-24 19:18 +0200
  Re: How to get a character consisting of multiple bytes into a string literal? James Kuyper <jameskuyper@verizon.net> - 2015-10-24 14:06 -0400
    Re: How to get a character consisting of multiple bytes into a string literal? Philipp Klaus Krause <pkk@spth.de> - 2015-10-24 20:39 +0200
      Re: How to get a character consisting of multiple bytes into a string literal? James Kuyper <jameskuyper@verizon.net> - 2015-10-24 15:05 -0400
  Re: How to get a character consisting of multiple bytes into a string literal? Richard Damon <Richard@Damon-Family.org> - 2015-10-24 14:07 -0400
    Re: How to get a character consisting of multiple bytes into a string literal? James Kuyper <jameskuyper@verizon.net> - 2015-10-24 14:33 -0400
    Re: How to get a character consisting of multiple bytes into a string literal? Philipp Klaus Krause <pkk@spth.de> - 2015-10-24 21:30 +0200
  Re: How to get a character consisting of multiple bytes into a string literal? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-10-24 11:11 -0700
    Re: How to get a character consisting of multiple bytes into a string literal? Keith Thompson <kst-u@mib.org> - 2015-10-24 13:44 -0700
  Re: How to get a character consisting of multiple bytes into a string literal? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-24 19:18 +0100
  Re: How to get a character consisting of multiple bytes into a string literal? Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-24 11:57 -0700
    Re: How to get a character consisting of multiple bytes into a string literal? Philipp Klaus Krause <pkk@spth.de> - 2015-10-24 21:32 +0200
      Re: How to get a character consisting of multiple bytes into a string literal? James Kuyper <jameskuyper@verizon.net> - 2015-10-24 15:54 -0400
      Re: How to get a character consisting of multiple bytes into a string literal? Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-24 14:43 -0700
        Re: How to get a character consisting of multiple bytes into a string literal? Philipp Klaus Krause <pkk@spth.de> - 2015-10-25 10:38 +0100
          Re: How to get a character consisting of multiple bytes into a string literal? Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-25 10:05 -0700

csiph-web