From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada.Directories and UTF-8 encoding ?
Date: Thu, 6 Dec 2012 17:53:43 +0100
Date: 2012-12-06T17:53:43+01:00 [thread overview]
Message-ID: <160zje8mqy7al.zyvbpn3bxug3.dlg@40tude.net> (raw)
In-Reply-To: 6585ae1a-cb06-46d0-bae4-26a0b437e09b@googlegroups.com
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
next prev parent reply other threads:[~2012-12-06 16:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-06 13:37 Ada.Directories and UTF-8 encoding ? gautier_niouzes
2012-12-06 16:53 ` Dmitry A. Kazakov [this message]
2012-12-06 17:56 ` Michael Rohan
2012-12-10 23:28 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox