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,5d4095813b818c7d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!newspeer2.se.telia.net!se.telia.net!masternews.telia.net.!newsb.telia.net.POSTED!not-for-mail From: =?ISO-8859-1?Q?Bj=F6rn?= Persson Subject: Re: Reading "normal" text files with Wide_Text_IO in GNAT Newsgroups: comp.lang.ada References: <1164916470.648544.256710@n67g2000cwd.googlegroups.com> User-Agent: KNode/0.10.4 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8Bit Message-ID: Date: Sun, 03 Dec 2006 01:22:24 GMT NNTP-Posting-Host: 83.250.96.174 X-Complaints-To: abuse@telia.com X-Trace: newsb.telia.net 1165108944 83.250.96.174 (Sun, 03 Dec 2006 02:22:24 CET) NNTP-Posting-Date: Sun, 03 Dec 2006 02:22:24 CET Organization: Telia Internet Xref: g2news2.google.com comp.lang.ada:7790 Date: 2006-12-03T01:22:24+00:00 List-Id: Adam Beneschan wrote: > However, at first glance, I didn't see a way to get Wide_Text_IO to > read a UCS-1 text file. Hmm, I've never heard of UCS-1. Is such an encoding really defined? > This is the encoding where each byte in the > range 16#00#..16#FF# represents a character in the range > Wide_Character'Val(16#0000#) .. Wide_Character'Val(16#00FF#), and there > is no way to represent wide characters from 16#0100# to 16#FFFF#. OK, so it's identical to ISO 8859-1. > Does GNAT's Wide_Text_IO have a way to read a file like this? It does indeed look like it can't. Gnat's approach to character encodings is amazingly faulty. Does EAstrings fill your needs? If not, would you like to join me in finishing the implementation so we can get rid of these problems? http://adacl.sourceforge.net/AdaBrowse/adacl-eastrings.html -- Bj�rn Persson PGP key A88682FD omb jor ers @sv ge. r o.b n.p son eri nu