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.3 required=5.0 tests=BAYES_00,INVALID_MSGID,XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,36d7c374b100245d,start X-Google-Attributes: gid103376,public From: "Thierry Lelegard" Subject: Wide_String, Chinese & Japanese text files Date: 1999/08/20 Message-ID: <7pka2j$lnn$1@front2.grolier.fr>#1/1 X-Deja-AN: 515229329 Content-Transfer-Encoding: 7bit X-Trace: front2.grolier.fr 935177107 22263 195.36.163.116 (20 Aug 1999 19:25:07 GMT) Organization: Club-Internet (France) X-MSMail-Priority: Normal X-Priority: 3 Content-Type: text/plain; charset="Windows-1252" Mime-Version: 1.0 NNTP-Posting-Date: 20 Aug 1999 19:25:07 GMT X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Newsgroups: comp.lang.ada Date: 1999-08-20T19:25:07+00:00 List-Id: 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