comp.lang.ada
 help / color / mirror / Atom feed
From: Gautier write-only <gautier_niouzes@hotmail.com>
Subject: Re: Open URLs
Date: Sun, 3 Jan 2010 10:36:04 -0800 (PST)
Date: 2010-01-03T10:36:04-08:00	[thread overview]
Message-ID: <4f63b3f3-3733-433f-969d-388088cda872@34g2000yqp.googlegroups.com> (raw)
In-Reply-To: dfd5fbb5-a8c0-49e0-9a0b-4fb038089da8@34g2000yqp.googlegroups.com

> I am looking for a way to open URLs (like "file:///home/vlc/file") as
> files - as you would do with "Open (Handle, In_File, "/home/vlc/
> file")".
>
> I could surely just remove the heading "file://", but this would still
> leave me with the problem of special characters like "file:///home/vlc/
> name%20with%20spaces".
>
> Does anybody know of a way to translate URLs to paths?

What about doing successive string replacements:
"file://" -> ""
"%20" -> " "
etc.
?
Probably you need to make a "Replace_all" function using
Ada.Strings.Fixed's routines (unless it's already there), then it
should be straightforward.
______________________________________________________________
Gautier's Ada programming -- http://gautiersblog.blogspot.com/



  reply	other threads:[~2010-01-03 18:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-03 18:17 Open URLs vlc
2010-01-03 18:36 ` Gautier write-only [this message]
2010-01-03 18:36 ` Pascal Obry
2010-01-03 18:53   ` vlc
2010-01-03 20:05 ` Dmitry A. Kazakov
2010-01-14  8:32   ` David Thompson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox