homepage Welcome to WebmasterWorld Guest from 54.226.93.128
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Spaces in filename - Potential problem?
I have PDFs that have spaces in the name
ikkyu




msg:3514525
 4:32 pm on Nov 27, 2007 (gmt 0)

I have several PDFs that I have to serve up and the current filenames have multiple spaces in the name like "ABC Widget Spec Sheet.pdf" and I don't want to rename which would make for confusion. Am I going to run into any problems serving these pages(Apache 1.3)? My experience tells me no, but is there any browser specific issues (or any other issues for that matter) that I might run into?

 

rocknbil




msg:3514644
 7:08 pm on Nov 27, 2007 (gmt 0)

Well, modern browsers and file systems **will** correctly connect with file names with spaces, but IMO it's still a bad idea.

<a href="ABC Widget Spec Sheet.pdf">See PDF</a>

When you follow this link, here's what appears in the address bar, or the URL that gets bookmarked:

http://www.example.com/ABC%20Widget%20Spec%20Sheet.pdf

Uhhhhg-Leeee. It's just a sloppy way to work. If you like the file-name recognition, use underscores or dashes:

ABC_Widget_Spec_Sheet.pdf
ABC-Widget-Spec-Sheet.pdf

ikkyu




msg:3515256
 2:33 pm on Nov 28, 2007 (gmt 0)

I agree that the %20 is ugly, but I do have many files that I would have to replace the spaces with dashes - anyone have a perl one-liner or command line command to replace all spaces with dashes by any chance?

ikkyu




msg:3515280
 2:56 pm on Nov 28, 2007 (gmt 0)


% rename 'tr/ /\-/' *

That did the trick on linux anyway.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved