[Orca-users] Strange File Names Revisited

Alex Kiernan alex.kiernan at gmail.com
Thu Sep 1 22:58:54 PDT 2005


On 02/09/05, Blair Zajac <blair at orcaware.com> wrote:
> Alex Kiernan wrote:
> > On 22/08/05, Alex Kiernan <alex.kiernan at gmail.com> wrote:
> >
> >>On 21/08/05, Blair Zajac <blair at orcaware.com> wrote:
> >>
> >>>>If you're using IE, it doesn't like those `\'s (it turns them around
> >>>>into `/'s), this is the patch I'm using:
> >>>>
> >>>>Index: lib/Orca/Utils.pm
> >>>>===================================================================
> >>>>RCS file: /cvsroot/upstream/orca/lib/Orca/Utils.pm,v
> >>>>retrieving revision 1.1.1.6
> >>>>retrieving revision 1.5
> >>>>diff -u -r1.1.1.6 -r1.5
> >>>>--- lib/Orca/Utils.pm   11 Jul 2005 05:21:08 -0000      1.1.1.6
> >>>>+++ lib/Orca/Utils.pm   22 Jul 2005 07:55:03 -0000      1.5
> >>>>@@ -110,6 +110,7 @@
> >>>>   my ($name, $postfix_length) = @_;
> >>>>
> >>>>   $name =~ s/:/_/g;
> >>>>+  $name =~ s/\\/\//g;
> >>>>   $name =~ s:/:_per_:g;
> >>>>   $name =~ s:\s+:_:g;
> >>>>   $name =~ s:%:_pct_:g;
> >>>
> >>>This will work, but in the end, a \ becomes a / which is replaced with a
> >>>_per_, which changes the meaning of the URL (for those who read the URLs
> >>>:) ).  We should change the \ into something else.
> >>>
> >>>Does IE change the %xx equivalent of the \?
> >>>
> >>
> >>I don't think so, but I can't check just at the moment.
> >>
> >
> >
> > Just checked... if you change the substitution to %5C, you get
> > filenames on disk which are ...%5C..., but IE then evaluates the %5C
> > and requests the file as ...\... So it still doesn't work, but it does
> > fail differently!
> >
> 
> Alex,
> 
> Can you try changing the line
> 
> +  $name =~ s/\\/\//g;
> 
> to
> 
> +  $name =~ s/\\/|/g;
> 
> and let me know if that works.

Looks like it works fine.

-- 
Alex Kiernan




More information about the Orca-users mailing list