Re: System.WCh_Cnv



Actually the Unicode codepoint range is 0 .. 10FFFF and therefore
fits in 21 bits.

... the definition would allow expansion to 31-bits (but no
further).

The definition of some particular *encoding* namely UCS-4. Not of the "character set" range. Character = codepoint. And this stops at 10FFFF. And it will not be extended. IIRC both Organizations went on record on this. Silly maybe, but not per se. It has to do with variable length encodings. It facilitates search and verification. Now these encodings may be a bit silly, yes.

I have been sketching a highly simplified, short, clear, logical, understandable, usable, no nonsense, package for Unicode. I have not been making much progress for several reasons. If someone wants to join that would be great. The first lines of the spec follow.

-- Unico : no nonsense Unicode support for Ada
-- (C) 2006 Marius Amado Alves

with Ada.Containers.Vectors;
with Ada.Streams;

package Unico is

type Character is range 0 .. 16#10FFFF#;
for Character'Size use 24;

procedure Write
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Item : in Character);

procedure Read
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Item : out Character);

for Character'Write use Write;
for Character'Read use Read;

package Strings is new Ada.Containers.Vectors
(Index_Type => Positive, Element_Type => Character);

subtype String is Strings.Vector;

type Fixed_String is array (Positive range <>) of Character;
for Fixed_String'Component_Size use 24;
pragma Pack (Fixed_String);


.



Relevant Pages

  • Re: Char type verification
    ... What this example does is output whether the 1st character of the 1st ... In the Ada world, we ... I'm very sorry Jeffrey, but I'm afraid you're missing the point. ... Is_Upper in the package Ada.Characters.Handling, ...
    (comp.lang.ada)
  • Re: SIunits: Improvements, integration with SIstyle, etc.
    ... The only superscripts defined ... by the siunits package are numerical. ... alternate superscript character. ...
    (comp.text.tex)
  • Re: Distribution software for purchase
    ... We have a character based, very mature, very feature rich, inventory ... We stopped marketing our current package for the duration of the ... are willing to pay for it. ... Inventory Control and other modules. ...
    (comp.databases.pick)
  • Re: (read) problem with packages
    ... How can i make it ignore if the package exists and only read ... The colon is considered to be a constituent character of a token. ...
    (comp.lang.lisp)
  • Re: Unicode with LaTeX
    ... there's a distinct possibility that the character you're after doesn't ... Use the CJK package, and you are ... CJK documents. ... The CJK stuf is decidedly non-trivial to install, notably the font ...
    (comp.text.tex)