comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: KC normalization form for text
Date: Tue, 26 Feb 2008 15:08:58 -0600
Date: 2008-02-26T15:08:58-06:00	[thread overview]
Message-ID: <fq1v70$jin$1@jacob-sparre.dk> (raw)
In-Reply-To: 2c2354d7-b427-4420-8161-7da417e92505@34g2000hsz.googlegroups.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1835 bytes --]

"Hibou57 (Yannick Duch�ne)" <yannick_duchene@yahoo.fr> wrote in message
news:2c2354d7-b427-4420-8161-7da417e92505@34g2000hsz.googlegroups.com...
> LRM 2.1 4.1/2 :
> > The semantics of an Ada program whose text is not in Normalization Form
KC (as defined by section
> > 24 of ISO/IEC 10646:2003) is implementation defined.
>
> Does it really apply as well on character literals, string literals
> and comments ?
>
> If it does, this is very restrictive (mainly for character and string
> literals).

Yes, of course it applies. The reason for the wording is that some Unicode
documents insist that programs that are not normalized are dangerous, and
strongly recommend that everything be normalized. Initially, we required
that the program be converted by the compiler into a normalized form before
processing. But such a conversion has its own problems (and would be a lot
of work for compiler implementers), so in the end we decided to cop-out with
the statement you see above.

I would suspect that most compilers simply don't care about unnormalized
programs, and everything will work fine (without any normalization being
applied, nor any rejection). But the rule allows a compilers especially
worried about security to do normalization and/or code rejection.

In any case, what a compiler does is supposed to be documented. (That's the
difference between "implementation-defined" and "unspecified" in the Ada
standard.) So you can depend on whatever the compiler does, you just can't
*assume* that the code will be portable.

                                          Randy.

P.S. If you want a more definitive answer, you have to ask the ARG by
sending a formal question to Ada-Comment@Ada-Auth.org. I suggest joining the
mailing list if you do that, so that you see any replies (especially
requests for more information).






  reply	other threads:[~2008-02-26 21:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-26  4:03 KC normalization form for text Hibou57 (Yannick Duchêne)
2008-02-26 21:08 ` Randy Brukardt [this message]
2008-02-27  0:14   ` Hibou57 (Yannick Duchêne)
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox