From: "Björn Persson" <spam-away@nowhere.nil>
Subject: Re: System.WCh_Cnv
Date: Thu, 13 Jul 2006 21:30:15 GMT
Date: 2006-07-13T21:30:15+00:00 [thread overview]
Message-ID: <HXytg.8972$E02.2845@newsb.telia.net> (raw)
In-Reply-To: <1152811469.003475.301520@s13g2000cwa.googlegroups.com>
demoonlit@panathenaia.halfmoon.jp wrote:
> Windows comand prompt
OK, so your OS is Windows.
> So I'd convert JIS character code to other code set(with iconv,
> mbstowcs, etc).
Do you have Iconv? I thought that wasn't available in Windows.
> And other Ada packages assume Wide_String as Unicode. I think it's
> natural, because C-functions assume wchar_t as Unicode.
> If at all possible, I want take Wide_String as Unicode same as
> C-runtime functions.
Let's get some things straight so that we'll understand each other
better. Unicode defines several character encodings. When you write
"Unicode", do you mean UTF-8, UTF-16, UCS-4 (also called UTF-32) or
UCS-2? Ada's Wide_String is UCS-2 and Wide_Wide_String is UCS-4. In C
it's implementation-defined how wide a wide character is. As far as I
know, wchar_t is usually 32 bits in Unix, so that a "wide string" is
UCS-4. I hear Microsoft uses 16 bits for wchar_t, but I'm not sure
whether a "wide string" in Windows is treated as UCS-2 or UTF-16.
> System.WCh_Cnv confound JIS character code with Unicode, it makes
> troubles. Wide_Text_IO (and -gnatWs, -gantWe) are useless in fact,
> because there is no what uses JIS character code as it is, conversion
> is needed after all.
I haven't used that package myself so I don't know how it works, but I
won't be surprised if it's buggy. In my experience, Adacore's handling
of character encodings is rather unimpressive.
> So, I want to know why System.WCh_Cnv takes JIS character code?
As it's a Gnat-specific package, only Adacore knows why they did it the
way they did. You could ask them, but I don't think they'll answer this
kind of questions unless you buy a support contract.
--
Bj�rn Persson PGP key A88682FD
omb jor ers @sv ge.
r o.b n.p son eri nu
next prev parent reply other threads:[~2006-07-13 21:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-12 14:13 System.WCh_Cnv Y.Tomino
2006-07-12 15:51 ` System.WCh_Cnv Martin Krischik
2006-07-12 18:57 ` System.WCh_Cnv Björn Persson
2006-07-13 17:24 ` System.WCh_Cnv demoonlit
2006-07-13 21:30 ` Björn Persson [this message]
2006-07-14 7:19 ` System.WCh_Cnv Dmitry A. Kazakov
2006-07-14 7:40 ` System.WCh_Cnv Martin Krischik
2006-07-14 12:18 ` System.WCh_Cnv Björn Persson
2006-07-16 11:41 ` System.WCh_Cnv Martin Krischik
2006-07-24 21:00 ` System.WCh_Cnv Björn Persson
2006-07-24 23:35 ` System.WCh_Cnv Randy Brukardt
2006-07-25 0:45 ` System.WCh_Cnv Marius Amado-Alves
2006-07-14 16:13 ` System.WCh_Cnv Georg Bauhaus
2006-07-12 18:57 ` System.WCh_Cnv Björn Persson
2006-07-13 17:34 ` System.WCh_Cnv demoonlit
[not found] <8BB3B99E-16DA-4EBF-A2FE-50B079349CA9@amado-alves.info>
2006-07-25 0:45 ` System.WCh_Cnv Marius Amado-Alves
[not found] <EBEKJMEEPPFAACCBBGNHAELNDIAA.randy@rrsoftware.com>
2006-07-25 10:31 ` System.WCh_Cnv Marius Amado-Alves
2006-07-25 12:21 ` System.WCh_Cnv Dmitry A. Kazakov
2006-07-25 13:03 ` System.WCh_Cnv Marius Amado-Alves
2006-07-25 13:36 ` System.WCh_Cnv Dmitry A. Kazakov
2006-07-25 14:09 ` System.WCh_Cnv 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