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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,5bcc293dc5642650 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news3.google.com!feeder.news-service.com!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Why no Ada.Wide_Directories? Date: Fri, 14 Oct 2011 14:48:41 +0200 Organization: Ada @ Home Message-ID: References: <9937871.172.1318575525468.JavaMail.geo-discussion-forums@prib32> NNTP-Posting-Host: kZZSPQ1ESub3hB+UCZg5Hg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/11.51 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news1.google.com comp.lang.ada:21429 Date: 2011-10-14T14:48:41+02:00 List-Id: Le Fri, 14 Oct 2011 11:07:20 +0200, Dmitry A. Kazakov = a =C3=A9crit: > On Fri, 14 Oct 2011 09:39:32 +0200, Yannick Duch=C3=AAne (Hibou57) wro= te: > >> Le Fri, 14 Oct 2011 08:58:45 +0200, Michael Rohan >> a =C3=A9crit: >> >>> I've working a little on accessing files and directories using >>> Ada.Directories and have been using a thin wrapper layer to convert = = >>> from >>> Wide_String to UTF8 and back. >> Does it mean you pass UTF-8 encoded strings to Ada directory operatio= ns = >> ? > > In most cases this is how it works under Linux. Under Windows that wou= ld > depend what kind of operations xA, xW etc the implementation uses. This is indeed not safe to use. I get it raising exceptions when facing = = file names (perfectly valid file names for the OS), which it did not lik= e = (containing characters outside of ISO-8859). As platform independent, th= is = package should not impose its own conventions on a platform, so better = avoid it, indeed. It's not safe for a program to fail scanning sanely th= e = content of a directory when it should be able to (unless its OK for the = = program to randomly miss some files). -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [Ep= igrams on = Programming =E2=80=94 Alan J. =E2=80=94 P. Yale University] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [Idem] Java: Write once, Never revisit