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,9a4a153357345e17 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.78.40 with SMTP id y8mr506883paw.9.1354812835477; Thu, 06 Dec 2012 08:53:55 -0800 (PST) Path: 6ni30734pbd.1!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!feeder.erje.net!eu.feeder.erje.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada.Directories and UTF-8 encoding ? Date: Thu, 6 Dec 2012 17:53:43 +0100 Organization: cbb software GmbH Message-ID: <160zje8mqy7al.zyvbpn3bxug3.dlg@40tude.net> References: <6585ae1a-cb06-46d0-bae4-26a0b437e09b@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: kWJV5lTRAyCzy8lsfOrlcw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-12-06T17:53:43+01:00 List-Id: On Thu, 6 Dec 2012 05:37:27 -0800 (PST), gautier_niouzes@hotmail.com wrote: > Question: is there a support for UTF-8-encoded file names in > Ada.Directories, either mentioned in the RM 2005, 2012, or in some > implementations ? I am using GIO bindings instead of Ada.Directories for this reason. > For instance only Copy_File has a Form parameter and on GNAT GPL 2012 it > seems to ignore "encoding=utf-8". Form is a system-dependent parameter. > For a directory search using Search it would be nice to have utf-8 working > (not tested yet; I'll give a try with the Rosetta code: > http://rosettacode.org/wiki/Walk_a_directory/Recursively#Ada ). I don't remember if I tested it for that when I wrote it. It is very unlikely that Windows implementation uses UTF-8. I guess it is ASCII (A-calls of Win32 API), which GNAT's implementation of Ada.Directories makes = it is broken. You could use GIO bindings, they should work as expected in a system-independent way. They also support MIME types. See Dir_Open, Dir_Read_Name, Dir_Close. http://www.dmitry-kazakov.de/ada/gtkada_contributions.htm#Gtk.Missed.Dir_Open -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de