[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Long File Names w/Spaces in Win32.



Ang-Chih Kao schrieb:


Hi Ang-Chih,

I've fixed this. The fixed version including some other changes (sortable
directory index :) and polygon and ellipse support for imagemaps :) you can
find under http://www.johnroy.com/pi3/pi3web/files/devel/Pi3Web-1004_hz.zip. 
The binaries are compiled with MSVC++ 5.0 without code optimization from the
developer release 1.1 sources. Be carefull if replacing your version or build
your own version from the available and my new sources.
-- 
with regards
Holger

> 
> Hi,
> 
> I discovered a problem with the directory listing in the default config.pi3
> file under Win32, when a file name has spaces in it.  Basically the current
> method replaces the " " with "+".  This seems rather odd, since the Pi3 is
> unable to conver "+" back to " " when retrieving the file.  Anyways here is
> the default setup:
> 
> <Object>
>         Name TableHTML
>         Class DirectoryIndexClass
>         FilePattern "<TR>\
> <TD NOWRAP ALIGN=LEFT VALIGN=TOP>\
> <A HREF="%r"><IMG SRC="%i" BORDER=NONE ALIGN=MIDDLE ALT=""></A>\
> <TD NOWRAP ALIGN=LEFT VALIGN=TOP><A HREF="%r">&abbrev(%n,20,...)</A>\
> <TD NOWRAP ALIGN=LEFT VALIGN=TOP>%s<TD>%l\
> <TD NOWRAP ALIGN=LEFT VALIGN=TOP>&if(%d,%d,<I>%c</I>)\n"
> 
> {{{SNIP ---- SNIP}}}
> 
>         Options " Name | AbbrevSize | RelPath | Icon | MIMEType "
> </Object>
> 
> What you need to change is to replace the "%r"'s with "%a".  And then add
> 'AltName" to the Options line.  This basically makes the link to a the 8.3
> file name, rather than the long file name.  So something like "Everclear I
> will buy you a new life.mp3" is actually linked as "Evercl~1.mp3".  The
> revised version looks like:
> 
> <Object>
>         Name TableHTML
>         Class DirectoryIndexClass
>         FilePattern "<TR>\
> <TD NOWRAP ALIGN=LEFT VALIGN=TOP>\
> <A HREF="%a"><IMG SRC="%i" BORDER=NONE ALIGN=MIDDLE ALT=""></A>\
> <TD NOWRAP ALIGN=LEFT VALIGN=TOP><A HREF="%a">&abbrev(%n,20,...)</A>\
> <TD NOWRAP ALIGN=LEFT VALIGN=TOP>%s<TD>%l\
> <TD NOWRAP ALIGN=LEFT VALIGN=TOP>&if(%d,%d,<I>%c</I>)\n"
> 
> {{{SNIP ---- SNIP}}}
> 
>         Options " Name | AltName | AbbrevSize | RelPath | Icon | MIMEType "
> </Object>
> 
> Question to John:
> Why did you set it up with %r.  And what is the point of %r?  I would
> imagine the Unix would want a "%20", rather than a "+".  Is it meant for a
> server query string?
> 
> Later all.

---------------------------------------------------------
Holger 'Zimpel' Zimmermann    Contact me:
---------------------------------------------------------
Wendishain                    tel./fax company: on demand
Germany                       tel./fax private: on demand
---------------------------------------------------------
homepage: http://home.t-online.de/home/zimpel/
web server: surf to it from my homepage (online every
            Sunday 20:00-24:00 GMT, start shifted again)
e-Mail:     zimpel@t-online.de
--------------------------------------------------------