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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bcb6f63419c2a56b X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed.mathworks.com!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!news.tiscali.fr!foorum!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Supporting full Unicode Date: 12 May 2004 07:44:56 GMT Message-ID: <2004512-94456-948110@foorum.com> References: <9j8oc.16324$V97.13312@newsread1.news.pas.earthlink.net> NNTP-Posting-Host: 212.190.145.10 NNTP-Posting-Date: 12 May 2004 07:44:56 GMT X-Complaints-To: abuse@foorum.fr X-POSTER: foorum.com X-Foorum_user_tmp_id: 200454-93313-705548-212.190.145.10-foorum X-Originating-User: 212.190.145.10 X-Newsreader: Foorum Xref: controlnews3.google.com comp.lang.ada:466 Date: 2004-05-12T07:44:56+00:00 List-Id: Brian Catlin asked: > The complete definition of Unicode allows for 2-,3-, and 4-byte > characters. How is this supported in Ada95 and Ada0y? I am not aware of any differences between Ada 95 and Ada 2005 in that respect. Ada 95 has a type Wide_Character, "whose values correspond to the 65536 code positions of the ISO 10646 Basic Multilingual Plane (BMP)." (RM 3.5.2(3)). So, Ada 95 supports the UCS-2 encoding natively. The other standard type, Character, is defined as Latin-1. As you can see, there is no standard support for 3- and 4-byte characters; you would have to support them in a nonstandard way, e.g. type Wide_Wide_Character is mod 2**32; -- UCS-4 type Wide_Wide_String is array (Natural range <>) of Wide_Wide_Character; But I would favour using UTF-8 as the internal encoding anyway. It is easy to define a UTF8_String type similar to the above. GtkAda has such a type, as GTK+ uses UTF-8 as both internal and external encoding. -- Ludovic Brenta. -- Use our news server 'news.foorum.com' from anywhere. More details at: http://nnrpinfo.go.foorum.com/