From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.176.4.100 with SMTP id 91mr5299512uav.2.1477688892621; Fri, 28 Oct 2016 14:08:12 -0700 (PDT) X-Received: by 10.157.63.248 with SMTP id i53mr2061652ote.14.1477688892582; Fri, 28 Oct 2016 14:08:12 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!g32no191149qta.1!news-out.google.com!z32ni274qtc.1!nntp.google.com!z54no512798qtz.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 28 Oct 2016 14:08:12 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=174.28.151.13; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 174.28.151.13 References: <86f0d2fe-d498-4bc4-bb9d-e34629c89bb4@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4233b7cc-d53f-4f28-b9ce-c12249b97e4f@googlegroups.com> Subject: Re: Bug in Ada - Latin 1 is not a subset of UTF-8 From: Shark8 Injection-Date: Fri, 28 Oct 2016 21:08:12 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2540 X-Received-Body-CRC: 419370622 Xref: news.eternal-september.org comp.lang.ada:32189 Date: 2016-10-28T14:08:12-07:00 List-Id: On Tuesday, October 18, 2016 at 2:45:05 AM UTC-6, Dmitry A. Kazakov wrote: > On 18/10/2016 10:23, G.B. wrote: > > On 18.10.16 09:41, Dmitry A. Kazakov wrote: > >> On 18/10/2016 01:25, G.B. wrote: > >>> On 17.10.16 22:18, Lucretia wrote: > >> > >>> According to ISO 10646, UTF stands for UCS Transformation > >>> Format. So, it's a format, suggesting a representation. > >>> > >>> On similar grounds, one could define a string subtype for > >>> other types of objects, for example > >>> > >>> subtype Number_String is String; > >> > >> You are wrong. > > > > The constraints on either UTF_String or or Number_String are > > not expressible as simple Ada subtypes. They are given by > > description and normative reference, respectively. >=20 > In the case of UTF-8 it is not a constraint. "=C3=84" has different=20 > representations as Latin-1 and UTF-8 strings. >=20 > Numeric character is a constraint expressible in Ada: >=20 > subtype Numeric is Character range '0'..'9'; >=20 > Numeric string constraint is not expressible, but it still a constraint. You are wrong; it is expressible: -- Using your Numeric character subtype. Subtype Digits is String with Dynamic_Predicate =3D> (for all Ch of Digits =3D> Ch in Numeric);