comp.lang.ada
 help / color / mirror / Atom feed
From: "Thierry Lelegard" <lelegard@club-internet.fr>
Subject: Wide_String, Chinese & Japanese text files
Date: 1999/08/20
Date: 1999-08-20T19:25:07+00:00	[thread overview]
Message-ID: <7pka2j$lnn$1@front2.grolier.fr> (raw)

Hello,

We are going to need to process, in Ada 95, text files
containing Chinese and Japanese messages (for i18n purpose).
I have absolutely no experience in handling this kind of files.
I do not even know the usual format of that kind of text
files (8 or 16 bits/char).

Due to the amount of possible combinations, I assume
that at least some these languages require 16 bits per
character.

So, before appointing people to write the messages, I
have one request and one question.

1) Could anyone e-mail me a text file containing a
typical example of 16 bits characters Chinese or
Japanese text file, preferably from both UNIX
Windows worlds if there are some incompatibilities
such as the traditional LF vs CR/LF ?

2) How could I handle this in Ada? I naively though
that Ada.Wide_Text_IO would read 16 bits per character.
However (at least with gnat), it writes and read 8 bits
characters with "bracket coding" (as in Wide_String
literals). Of course, Sequential_IO on Wide_Character
or some kind of Stream_IO could do the trick but I
wonder if there some "standard" or at least "usual"
way to deal with this.

I must precise that we do not need to handle 16 bits
Ada source files, simply text files containing messages.
We already have the combined String/Wide_String support
in our applications, we simply need to choose the best
way to get the data from a file to a Wide_String. Then,
the Wide_Strings will be sent in SNMP messages.

Thank you all in advance.

-Thierry
________________________________________________________
Thierry Lelegard, Paris, France
E-mail: lelegard@club-internet.fr






             reply	other threads:[~1999-08-20  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-20  0:00 Thierry Lelegard [this message]
1999-08-21  0:00 ` Wide_String, Chinese & Japanese text files Robert Dewar
1999-08-21  0:00   ` Thierry Lelegard
1999-08-22  0:00     ` Robert Dewar
1999-08-22  0:00     ` Florian Weimer
1999-08-25  0:00       ` Georg Bauhaus
replies disabled

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