comp.lang.ada
 help / color / mirror / Atom feed
From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: Ada 2012 and Unicode package (UTF-nn encodings handling)
Date: Sun, 22 Aug 2010 20:51:24 +0200
Date: 2010-08-22T20:51:24+02:00	[thread overview]
Message-ID: <i4rrje$qrt$1@news.eternal-september.org> (raw)
In-Reply-To: <op.vhr3qlivule2fv@garhos>

Le 21/08/2010 10:12, Yannick Duchêne (Hibou57) a écrit :
> I just had a look back at
> http://www.ada-auth.org/standards/12aarm/html/AA-A-4-11.html
> Only Encode has this capability (via Output_BOM : Boolean).
> Decode/Convert has nothing similar and will always skip any 16#FEFF#
> which will be interpreted as a BOM instead of as a character (there is
> nothing like an Interpret_BOM : Boolean).
> 
> But may be I am missing something. Will have a deeper look at it and at
> the AI which come with it (I saw UTF-32 was at least “pronounced” during
> the talk).
I think you missed the "Encoding" function. The intended usage
(extracted from the !discussion section) is:
1) Read the first line. Call function Encoding on that line with an
   appropriate default to use if the line does not start with a
   BOM. Initialize the encoding scheme to the value returned by the
   function.

2) Decode all lines (including the first one) with the chosen encoding
   scheme. Since the BOM is ignored by Decode functions, it is not
   necessary to slice the first line specially.



-- 
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr



  reply	other threads:[~2010-08-22 18:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-20 21:38 Ada 2012 and Unicode package (UTF-nn encodings handling) Yannick Duchêne (Hibou57)
2010-08-20 21:41 ` Yannick Duchêne (Hibou57)
2010-08-21  6:21 ` Dmitry A. Kazakov
2010-08-21  7:01 ` J-P. Rosen
2010-08-21  8:12   ` Yannick Duchêne (Hibou57)
2010-08-22 18:51     ` J-P. Rosen [this message]
2010-08-22 19:48       ` Georg Bauhaus
2010-08-22 20:40         ` J-P. Rosen
2010-08-23 10:32           ` Georg Bauhaus
2010-08-23 22:28 ` Randy Brukardt
replies disabled

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