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,bde6706c124e6eed X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!newsfeed.inode.at!news.hispeed.ch!linux2.krischik.com!news From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Filenames in Ada Date: Thu, 24 Nov 2005 20:16:11 +0100 Organization: Cablecom Newsserver Message-ID: <1718304.Lhh4X6kH0F@linux1.krischik.com> References: <1653090.31FM62oI6I@linux1.krischik.com> NNTP-Posting-Host: 84-73-3-231.dclient.hispeed.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.hispeed.ch 1132861532 3169 84.73.3.231 (24 Nov 2005 19:45:32 GMT) X-Complaints-To: news@hispeed.ch NNTP-Posting-Date: Thu, 24 Nov 2005 19:45:32 +0000 (UTC) User-Agent: KNode/0.9.2 Xref: g2news1.google.com comp.lang.ada:6597 Date: 2005-11-24T20:16:11+01:00 List-Id: Martin Dowie wrote: > Martin Krischik wrote: >> Hello >> >> I was just starting to write a little demo program for Ada.Directories. >> Aim was the generation of m3u files for music collection. Allways nice to >> have a demo which actually does something. >> >> However, filenames in music collections contain all sort of funny >> characters (especially the my wife's music - allmost entirely in >> Cyrillic) - no big deal for modern file systems. But a big deal for Ada >> as it seams. Not only are all filenames in Ada.Directories of type String >> - actually all filenames anywhere are just String. >> >> How does one deal with modern (utf-8) filenames in Ada? >> >> Is there a chance for an add-on package (to late for Ada 2005) or are we >> snookered until Ada 2015. >> >> I also looked at C - they have appropriate functions in using >> Wide_Wide_Character for filenames. > > Aren't there some conversion routines to turn 16/32-bit UTF to/from > String in AWS or XML/Ada? You missed the point. I am speaking of filenames not file data. You can't pass UTF-8 into CreateFileA - you have to use CreateFileW and that need UTF-16. Actually - really UTF-16 or is it a simple Wide_Character string. Windows Gurus? Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com