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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6bf1c4b845bd2160 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!87.79.20.105.MISMATCH!news.netcologne.de!ramfeed1.netcologne.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 25 Aug 2010 17:51:39 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: What about a glob standard method in Ada.Command_Line ? References: <4c739e76$0$6992$9b4e6d93@newsspool4.arcor-online.net> <152a2z5en4z2o$.xjsuqr7s8yak$.dlg@40tude.net> <4c73e859$0$6991$9b4e6d93@newsspool4.arcor-online.net> <4c73fcf6$0$6992$9b4e6d93@newsspool4.arcor-online.net> <1jxm50y65grlo.sjyb9hm4y1xp$.dlg@40tude.net> <4c743a59$0$6893$9b4e6d93@newsspool2.arcor-online.net> <4c74db09$0$6890$9b4e6d93@newsspool2.arcor-online.net> <1r82cxcws3pc9$.r40m8l3ttil7$.dlg@40tude.net> <4c74f9f6$0$6772$9b4e6d93@newsspool3.arcor-online.net> <17drl4b1ko4iv.1eccfudluzl5h.dlg@40tude.net> <4c7515fc$0$7664$9b4e6d93@newsspool1.arcor-online.net> <4c752693$0$7656$9b4e6d93@newsspool1.arcor-online.net> <17uj112bzfc47$.1jlqotsp6zuup.dlg@40tude.net> In-Reply-To: <17uj112bzfc47$.1jlqotsp6zuup.dlg@40tude.net> Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: 8bit Message-ID: <4c753c0c$0$6877$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 25 Aug 2010 17:51:40 CEST NNTP-Posting-Host: 733e1c38.newsspool2.arcor-online.net X-Trace: DXC=_eE?iaAich5d8Nb@@ZG@b=A9EHlD;3Yc24Fo<]lROoR18kFnc\616M64>:Lh>_cHTX3j=`M_AeAf6gC: X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:13732 Date: 2010-08-25T17:51:40+02:00 List-Id: On 25.08.10 16:56, Dmitry A. Kazakov wrote: > Certainly and without any doubt it is > possible to provide an abstraction which would work for Posix, Unix, > Windows, VMS, MacOS and name what OS. It is not actually possible to provide a common abstraction for *new* and *existing* file names. While "broken", the file names do exist. Just a few examples illustrating a variety of file naming fun: - Names created in NTFS that end in a '.' - Two names in existing ext2 directories that contain "mutually exclusive" characters (via incompatible encoding) - Names containing characters that are special in Windows but not in POSIX. - Names with spaces in them To work with these, the abstraction would have to be super fault tolerant and employ AI, or just tell the user they should forget about working with their files because the file names are broken. I consider this disrespectful. Raising an exception is out of the question; it is the file contents that matter, not their just their names, no matter how the names have arrived in the state they are in. Wide_Wide_String can't cure these, String can, and you can transform from String to Wide_Wide_String after successful file name deciphering. >> And since there is no single, well defined, >> portable � for file names, > > It is same as to say that there is no portable Integer type. If in the real word, I/O of "broken" integer values is a reality. I/O of integer cannot rely on a perfect external representation. Neither can I/O of file names. The statistics of broken integers are just so much better. Possibly because no one even remembers that integers have a representation. There are less many encodings for them than for character sets, so there is less risk that we run into integers of unknown encoding, or sets of integers of different encodings. > Unicode code > points are portable because they are defined so. Before the fact. And then the facts are different, because someone managed to inject some invalid octet sequence... Nevertheless, this file's content is darn important. Can't just raise an exception because of a faulty name! Almost all WWW documents are broken by your taxonomy. Google is rich... Georg