comp.lang.ada
 help / color / mirror / Atom feed
* Reading "normal" text files with Wide_Text_IO in GNAT
@ 2006-11-30 19:54 Adam Beneschan
  2006-12-03  1:22 ` Björn Persson
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Beneschan @ 2006-11-30 19:54 UTC (permalink / raw)


I was looking in the GNAT reference manual at the description of the
WCEM Form parameter to Wide_Text_IO.Open.  It describes the different
ways that wide characters can be represented in text files that
Wide_Text_IO can interpret.

However, at first glance, I didn't see a way to get Wide_Text_IO to
read a UCS-1 text file.  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#.  In
other words, a boring old-fashioned 8-bit text file, maybe with Latin-1
characters or control characters in the 80..9F range.  Yes, I know that
a file like this could be read using Text_IO, but let's say that we
don't know what format the file is in until runtime.

Does GNAT's Wide_Text_IO have a way to read a file like this?

                        -- thanks, Adam




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-12-11 19:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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