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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,347f7cbe27451012 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.germany.com!feed.xsnews.nl!border-1.ams.xsnews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng1.kpn.DE!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Take Command Plugin, Win32Ada and Ada.Directories Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <3343563.psPA6e9Oqh@linux1.krischik.com> <1pkwbr5s12cf9$.9k2umlcxqzbr.dlg@40tude.net> <473A1241.90702@obry.net> <1vrktz0rlauvu.1nm0xh8n2wl90.dlg@40tude.net> <473ab86d$1@news.post.ch> <473ac065$0$16659$9b4e6d93@newsspool3.arcor-online.net> <1195039184.134708.325400@57g2000hsv.googlegroups.com> <1uxehqhjyj9tb$.1kijqqh179oad$.dlg@40tude.net> <1259577.KlClE9QBpM@linux1.krischik.com> Date: Thu, 15 Nov 2007 09:37:40 +0100 Message-ID: NNTP-Posting-Date: 15 Nov 2007 09:30:37 CET NNTP-Posting-Host: e6e2e480.newsspool1.arcor-online.net X-Trace: DXC=@fWfOFDQ_4IlU`@c^jLCbJic==]BZ:afN4Fo<]lROoRAFl8W>\BH3YBQ`X_cB9nhFGDNcfSJ;bb[EFCTGGVUmh?DLK[5LiR>kgBJXof7=j2dFO X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:18407 Date: 2007-11-15T09:30:37+01:00 List-Id: On Wed, 14 Nov 2007 21:15:43 +0100, Martin Krischik wrote: > Dmitry A. Kazakov wrote: > >> The problem is that Windows since NT is UTF-16, rather than UCS-2. So to >> use Wide_String just makes no any sense. It is not an array of characters >> anyway. Thus one could use plain String instead. > > Not quite - for interfacing with C you need an null character at the end of > the string - and for UTF-16 that is easier to handle using Wide_Character > to append to a Wide_String. I don't see any problem, just add NUL twice, if you convert anything manually. > I found that > Wide_String and Wide_Character work quite well for a Win32 application. Yes, this is why I thought it is UCS-2. But there exist some x % of potential cases where it will stop working. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de