Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #149672
| From | Manfred <noname@add.invalid> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Unicode in C Sources |
| Date | 2020-02-03 15:33 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <r19avh$7l4$1@gioia.aioe.org> (permalink) |
| References | (5 earlier) <1XzZF.178637$hD4.62031@fx47.iad> <r16v5c$1bff$1@gioia.aioe.org> <r178r3$eqm$1@dont-email.me> <r17clc$1boh$1@gioia.aioe.org> <r17gn4$447$1@dont-email.me> |
On 2/2/2020 10:58 PM, James Kuyper wrote: > On 2/2/20 3:49 PM, Manfred wrote: >> On 2/2/2020 8:44 PM, James Kuyper wrote: >>> On 2/2/20 11:59 AM, Manfred wrote: >>>> On 2/2/2020 2:14 PM, Richard Damon wrote: >>> ... >>>>> If written in the (ugly) \u notation then it is supposed to accept them, >>>>> but as the actual Unicode character itself, it is a function of what the >>>>> implementation defines as it extended source character set. >>>>> >>>>> My understanding is that the \u notation is designed that for a compiler >>>>> that does NOT accept full unicode source, you could have a pre-filter >>>>> phase that processes the source and converts the Unicode characters into >>>>> Universal characters (the \u and \U notation). It is even written so >>>>> this could be part of the early phases of the compiler. >>>> >>>> In fact the wording used in C++ standard is more explicit on this >>>> (translation phase 1), although my understanding of the wording of C >>>> standard mandates that the characters in D.1 be accepted in identifiers >>>> as well (with the exception of D.2 as initial) >>> >>> C++ does not allow an implementation-defined set of extended characters >>> to appear in an identifier, and it does not allow UCNs at the start of >>> an identifier. >> Almost correct: C++ allows UCNs at the start of an identifier, except >> those in table 3 [lex.name] (which is the counterpart of D.2) >> >> C allows both. > > I'd forgotten (if in fact, I ever knew) that C imposes the same > restrictions on initial UCNs. I should have reviewed the wording more > carefully before posting that comment. The part about an > "implementation-defined set of extended characters" is correct, and was > my main point. > >>> In C, The UCNs listed in D.1 must be accepted. Whether or not the >>> corresponding extended characters (if any) are accepted is entirely >>> implementation-defined. >>> >> This is the part that is not explicit (to me) in the C standard, when I >> read translation phase 1. > > The only thing that the description of translation phase 1 says which is > relevant is "Physical source file multibyte characters are mapped, in an > implementation-defined manner, to the source character set." And that's different from the C++ standard which adds: "Any source file character not in the basic source character set (5.3) is replaced by the universal-character-name that designates that character". This makes clear that after translation phase 1 any extended character is represented in UCN form, which is used in the syntax of identifiers. In the same clause, C++ also makes clear that "The set of physical source file characters accepted is implementation-defined." Keeping > mind that the extended source character set is a subset of the extended > source character set, this implies that extended characters are > permitted in C programs, but doesn't say anything to address the issue > of where they are permitted. I can't parse "extended source character set is a subset of the extended source character set" > > The relevant issue is the syntax of identifiers. The relevant wording is > in 6.4.2.1, which identifies "universal-character-name" and "other > implementation-defined characters" as two of the permitted forms that an > "identifier-nondigit" can take. 6.4.2.1p3 says "An implementation may > allow multibyte characters that are not part of the basic source > character set to appear in identifiers; which characters and their > correspondence to universal character names is implementation-defined." > The first sentence in that clause is "Each universal character name in an identifier shall designate a character whose encoding in ISO/IEC 10646 falls into one of the ranges specified in D.1." which suggests that D.1 is the set of allowed characters in identifiers. However, I understand that you are saying that in combination with the last sentence the condition of belonging to D.1. is a necessary but not sufficient condition to be allowed in an identifier. This seems to parse, but then how does it work with the possibility of the character being one of "other implementation-defined characters"? This ends up with D.1. being substantially useless.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Unicode in C Sources F Russell <fr@random.info> - 2020-02-01 17:12 +0000
Re: Unicode in C Sources Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-02-01 17:37 +0000
Re: Unicode in C Sources Anton Shepelev <anton.txt@gmail.com> - 2020-02-01 20:43 +0300
Re: Unicode in C Sources Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2020-02-01 10:57 -0800
Re: Unicode in C Sources David Brown <david.brown@hesbynett.no> - 2020-02-02 16:58 +0100
Re: Unicode in C Sources F Russell <fr@random.info> - 2020-02-02 17:05 +0000
Re: Unicode in C Sources David Brown <david.brown@hesbynett.no> - 2020-02-02 19:52 +0100
Re: Unicode in C Sources Bart <bc@freeuk.com> - 2020-02-02 19:20 +0000
Re: Unicode in C Sources Jorgen Grahn <grahn+nntp@snipabacken.se> - 2020-02-03 12:38 +0000
Re: Unicode in C Sources James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-02-03 09:16 -0500
Re: Unicode in C Sources David Brown <david.brown@hesbynett.no> - 2020-02-03 15:32 +0100
Re: Unicode in C Sources Öö Tiib <ootiib@hot.ee> - 2020-02-03 09:01 -0800
Re: Unicode in C Sources Jorgen Grahn <grahn+nntp@snipabacken.se> - 2020-02-03 21:15 +0000
Re: Unicode in C Sources F Russell <fr@random.info> - 2020-02-04 02:06 +0000
Re: Unicode in C Sources F Russell <fr@random.info> - 2020-02-04 02:19 +0000
Re: Unicode in C Sources Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-02-04 02:50 +0000
Re: Unicode in C Sources David Brown <david.brown@hesbynett.no> - 2020-02-04 08:16 +0100
Re: Unicode in C Sources Bart <bc@freeuk.com> - 2020-02-01 18:10 +0000
Re: Unicode in C Sources Richard Damon <Richard@Damon-Family.org> - 2020-02-01 15:19 -0500
Re: Unicode in C Sources Manfred <invalid@add.invalid> - 2020-02-02 00:13 +0100
Re: Unicode in C Sources Manfred <invalid@add.invalid> - 2020-02-02 00:46 +0100
Re: Unicode in C Sources Bart <bc@freeuk.com> - 2020-02-02 00:24 +0000
Re: Unicode in C Sources Richard Damon <Richard@Damon-Family.org> - 2020-02-02 08:14 -0500
Re: Unicode in C Sources Manfred <noname@add.invalid> - 2020-02-02 17:59 +0100
Re: Unicode in C Sources James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-02-02 14:44 -0500
Re: Unicode in C Sources Manfred <noname@add.invalid> - 2020-02-02 21:49 +0100
Re: Unicode in C Sources James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-02-02 16:58 -0500
Re: Unicode in C Sources Manfred <noname@add.invalid> - 2020-02-03 15:33 +0100
Re: Unicode in C Sources Manfred <noname@add.invalid> - 2020-02-03 15:38 +0100
Re: Unicode in C Sources James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-02-03 10:25 -0500
Re: Unicode in C Sources Manfred <noname@add.invalid> - 2020-02-03 19:11 +0100
Re: Unicode in C Sources James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-02-03 15:59 -0500
Re: Unicode in C Sources Manfred <noname@add.invalid> - 2020-02-04 16:51 +0100
Re: Unicode in C Sources James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-02-04 16:05 -0500
Re: Unicode in C Sources Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-02-19 12:17 -0800
Re: Unicode in C Sources David Brown <david.brown@hesbynett.no> - 2020-02-02 17:09 +0100
Re: Unicode in C Sources James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-02-02 14:46 -0500
Re: Unicode in C Sources David Brown <david.brown@hesbynett.no> - 2020-02-02 21:39 +0100
Re: Unicode in C Sources James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-02-02 17:07 -0500
Re: Unicode in C Sources David Brown <david.brown@hesbynett.no> - 2020-02-03 13:12 +0100
Re: Unicode in C Sources jacobnavia <jacob@jacob.remcomp.fr> - 2020-02-03 16:46 +0100
Re: Unicode in C Sources Bart <bc@freeuk.com> - 2020-02-03 16:47 +0000
Re: Unicode in C Sources James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-02-03 13:36 -0800
Re: Unicode in C Sources David Brown <david.brown@hesbynett.no> - 2020-02-03 23:56 +0100
Re: Unicode in C Sources James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-02-03 13:06 -0500
Re: Unicode in C Sources David Brown <david.brown@hesbynett.no> - 2020-02-03 22:25 +0100
Re: Unicode in C Sources James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-02-03 13:29 -0800
Re: Unicode in C Sources Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-02-19 12:30 -0800
Re: Unicode in C Sources James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-02-19 14:19 -0800
Re: Unicode in C Sources Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-04-02 07:50 -0700
Re: Unicode in C Sources James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-04-02 08:16 -0700
Re: Unicode in C Sources Bart <bc@freeuk.com> - 2020-02-03 22:33 +0000
Re: Unicode in C Sources James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-02-03 23:05 -0500
Re: Unicode in C Sources James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-02-03 23:10 -0500
Re: Unicode in C Sources Manfred <noname@add.invalid> - 2020-02-04 18:05 +0100
Re: Unicode in C Sources already5chosen@yahoo.com - 2020-02-04 09:38 -0800
Re: Unicode in C Sources Manfred <noname@add.invalid> - 2020-02-04 18:46 +0100
Re: Unicode in C Sources James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-02-04 16:07 -0500
Re: Unicode in C Sources Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-02-02 14:54 -0800
Re: Unicode in C Sources Siri Cruise <chine.bleu@yahoo.com> - 2020-02-03 15:10 -0800
Re: Unicode in C Sources jacobnavia <jacob@jacob.remcomp.fr> - 2020-02-03 07:47 +0100
Re: Unicode in C Sources David Brown <david.brown@hesbynett.no> - 2020-02-03 14:00 +0100
Re: Unicode in C Sources jacobnavia <jacob@jacob.remcomp.fr> - 2020-02-03 16:45 +0100
Re: Unicode in C Sources Guillaume <message@bottle.org> - 2020-02-03 17:54 +0100
Re: Unicode in C Sources David Brown <david.brown@hesbynett.no> - 2020-02-03 22:36 +0100
Re: Unicode in C Sources jacobnavia <jacob@jacob.remcomp.fr> - 2020-02-04 16:33 +0100
Re: Unicode in C Sources David Brown <david.brown@hesbynett.no> - 2020-02-04 16:45 +0100
Re: Unicode in C Sources Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-02-04 13:02 -0800
Re: Unicode in C Sources jacobnavia <jacob@jacob.remcomp.fr> - 2020-02-04 23:18 +0100
Re: Unicode in C Sources David Brown <david.brown@hesbynett.no> - 2020-02-05 11:07 +0100
Re: Unicode in C Sources Manfred <noname@add.invalid> - 2020-02-05 14:49 +0100
Re: Unicode in C Sources Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-02-16 06:23 -0800
Re: Unicode in C Sources David Brown <david.brown@hesbynett.no> - 2020-02-05 10:54 +0100
Re: Unicode in C Sources Manfred <noname@add.invalid> - 2020-02-05 14:51 +0100
Re: Unicode in C Sources Bart <bc@freeuk.com> - 2020-02-05 14:03 +0000
Re: Unicode in C Sources David Brown <david.brown@hesbynett.no> - 2020-02-05 16:31 +0100
Re: Unicode in C Sources Bart <bc@freeuk.com> - 2020-02-05 15:59 +0000
Re: Unicode in C Sources scott@slp53.sl.home (Scott Lurndal) - 2020-02-05 16:02 +0000
Re: Unicode in C Sources Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-02-05 16:59 +0000
Re: Unicode in C Sources Bart <bc@freeuk.com> - 2020-02-05 18:02 +0000
Re: Unicode in C Sources jacobnavia <jacob@jacob.remcomp.fr> - 2020-02-05 19:37 +0100
Re: Unicode in C Sources Manfred <noname@add.invalid> - 2020-02-05 19:37 +0100
Re: Unicode in C Sources jacobnavia <jacob@jacob.remcomp.fr> - 2020-02-05 21:02 +0100
Re: Unicode in C Sources Ian Collins <ian-news@hotmail.com> - 2020-02-06 10:34 +1300
Re: Unicode in C Sources Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-02-05 23:10 +0000
Re: Unicode in C Sources Manfred <noname@add.invalid> - 2020-02-06 13:53 +0100
Re: Unicode in C Sources Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-02-06 13:26 +0000
Re: Unicode in C Sources Richard Damon <Richard@Damon-Family.org> - 2020-02-06 07:27 -0500
Re: Unicode in C Sources Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-02-05 23:03 +0000
Re: Unicode in C Sources Mikko Rauhala <mjr@iki.fi> - 2020-02-06 10:46 +0000
Re: Unicode in C Sources David Brown <david.brown@hesbynett.no> - 2020-02-05 21:47 +0100
Re: Unicode in C Sources Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-02-05 22:50 +0000
Re: Unicode in C Sources scott@slp53.sl.home (Scott Lurndal) - 2020-02-07 00:25 +0000
Re: Unicode in C Sources Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-02-07 02:07 +0000
Re: Unicode in C Sources David Brown <david.brown@hesbynett.no> - 2020-02-05 16:26 +0100
Re: Unicode in C Sources antispam@math.uni.wroc.pl - 2020-04-18 03:58 +0000
csiph-web