• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Download file with special characters in the file name

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My file download works good, except when certain characters are in the file name.

When I have the following characters in the file name Firefox replaces the characters with an underscore. Does anyone know why???

The characters that don't work are: * < > | / : ; ? \ "

So my file name is ExportTest*Asterisk and Firefox changes it to ExportTest_Asterisk

(I'm sorry if this should have been posted in another forum, I wasn't sure which one to pic for this question.)

Here is my code snippet:
 
Sheriff
Posts: 28430
103
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would guess that's because those characters aren't allowed in real file names in most file systems.
 
Ray Clark
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, I knew that some of these weren't allowed in UNIX (I haven't used UNIX to create files in a few years). I didn't realize that Windows doesn't allow these either.
 
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OS X allows all but the slash and colon, but it's best to stick to normal characters that all platforms support.
 
Ray Clark
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Bear. BTW, I really like the redesign of the forum that you have in Beta.
 
If you believe you can tell me what to think, I believe I can tell you where to go. Go read this tiny ad!
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic