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-Thread: 103376,6511c3dc6e1155c9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!proxad.net!proxad.net!news-stoc.telia.net!217.209.241.210.MISMATCH!news-stod.telia.net!telia.net!masternews.telia.net.!newsb.telia.net.POSTED!not-for-mail From: =?ISO-8859-1?Q?Bj=F6rn_Persson?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 X-Accept-Language: sv, sv-se, sv-fi, en-gb, en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: String handling and character encodings References: <9g87l018jg6p8q7vi6ttbdvrelt3ohrpfo@4ax.com> In-Reply-To: <9g87l018jg6p8q7vi6ttbdvrelt3ohrpfo@4ax.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Message-ID: <7%05d.4074$d5.31975@newsb.telia.net> Date: Fri, 24 Sep 2004 22:14:27 GMT NNTP-Posting-Host: 217.209.116.179 X-Complaints-To: abuse@telia.com X-Trace: newsb.telia.net 1096064067 217.209.116.179 (Sat, 25 Sep 2004 00:14:27 CEST) NNTP-Posting-Date: Sat, 25 Sep 2004 00:14:27 CEST Organization: Telia Internet Xref: g2news1.google.com comp.lang.ada:4140 Date: 2004-09-24T22:14:27+00:00 List-Id: Fionn mac Cuimhaill wrote: > 5. Various extensions need to be done to character string handling. > Gwindows tries to hide the difference between character > representation among the various versions of Windows by defining a > GString to be composed of either ordinary or wide characters as > needed, and likewise tries to hide the differences between various > Windows API procedures and functions that use string arguments. This > hiding philosophy in not completely implemented and I still need to > use a variety of Ada system packages that have both ordinary and > wide-character versions. (Typically the wide versions, as I do all of > my development on Windows 2K and XP) If you're planning big extensions to the string handling, you may want=20 to have a look at how I have tried to solve the character encoding=20 problem in my EAstrings library, which is part of AdaCL. EAstrings keeps = track of how each string is encoded and transcodes automatically when=20 necessary. (The strings are "encoding-aware".) EAstrings doesn't just=20 hide the difference between String and Wide_String. It handles all the=20 encodings that the operating system knows about. You can see the code in its current state at=20 http://cvs.sourceforge.net/viewcvs.py/adacl/adacl/Include/ (the=20 adacl-eastrings* files). It works on Gnu-based systems (and maybe some=20 other unixoids if they have the Iconv functions). A Windows port is on=20 the to-do list. (Speaking of which, I could use some help from a Windows = programmer.) --=20 Bj=F6rn Persson PGP key A88682FD omb jor ers @sv ge. r o.b n.p son eri nu