comp.lang.ada
 help / color / mirror / Atom feed
From: "Adam Beneschan" <adam@irvine.com>
Subject: Re: Reading "normal" text files with Wide_Text_IO in GNAT
Date: 4 Dec 2006 10:17:35 -0800
Date: 2006-12-04T10:17:35-08:00	[thread overview]
Message-ID: <1165256255.486012.132810@l12g2000cwl.googlegroups.com> (raw)
In-Reply-To: kFpch.25227$E02.10276@newsb.telia.net

Björn Persson wrote:
> 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?

I don't know if that's the correct name.  I have seen it referenced in
a few places.

> > 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.

Technically, I thought ISO-8859-1 was a mapping from a range of
integers to a set of characters, rather than a specification of how
characters are represented in bits in an actual file.  I could be
wrong.  The distinction gets blurry at times.


> > 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

My question was more theoretical than anything---I was looking at that
section of the manual for other reasons, and happened to notice what
seemed like an omission.  But thanks for the pointer.  I'll take a look
at it.

                                 -- Adam




  reply	other threads:[~2006-12-04 18:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-30 19:54 Reading "normal" text files with Wide_Text_IO in GNAT Adam Beneschan
2006-12-03  1:22 ` Björn Persson
2006-12-04 18:17   ` Adam Beneschan [this message]
2006-12-04 23:35     ` Manuel Collado
2006-12-06 23:46       ` Björn Persson
2006-12-07  2:02         ` Adam Beneschan
2006-12-09 20:43           ` Björn Persson
2006-12-11 19:49           ` Manuel Collado
replies disabled

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