Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Download file with special characters in the file name

 
Ray Clark
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • 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:
 
Paul Clapham
Sheriff
Pie
Posts: 20750
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thank you Bear. BTW, I really like the redesign of the forum that you have in Beta.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic