Solved

MAC %20 Problem

Posted on 1998-04-15
6
307 Views
Last Modified: 2013-12-27
This is a web based application.  The application is for a company who receives uploaded documents from clients, via http from Netscape or Internet Explorer.  The uploaded document is uploaded and the document name is placed in the Database.  When the client Operating System is a Macintosh the following occurs:  If there are spaces in the filename the spaces are then changed into %20 so:
FileName:  Hello There
Changed to:  Hello%20There
i need to know what the problem is and how to fix it.
0
Comment
Question by:Achilles25
6 Comments
 
LVL 2

Expert Comment

by:ipierce
ID: 1542549
well that's certainly something you see a lot on the web.  the %20 refers to ASCII character number 20, which is a space.   Other nonstandard characters (i.e. not seen in URLs) like ! get a %22 or something like that.  Not that I know the fix, but maybe this will help.

also, please clarify a bit what is happening:  the mac client is uploading a file thru netscape or IE, on the mac it's called "hello there" but when it gets to the other end you see "hello%20there" as the file that just got uploaded to the server?  Is that accutare?
0
 
LVL 2

Expert Comment

by:squint
ID: 1542550
The solution is to run the file name through a "URL decode/escape" function.  You just need to account for this on the server application.  On Windows, all spaces in file names are internally translated to the "+" character, when the file is selected.  On the Mac, the spaces are translated to "%20".  All character are translated *again* when the form is submitted; the "+" character does not get escaped, but "%20" becomes "%2520" (25 is the hex code for the '%' character)!  This probrably should be classified as a bug.

An alternative is to write a JavaScript routine to obtain and encode the file name in the same manner across OS's.
0
 
LVL 6

Accepted Solution

by:
TheHub earned 200 total points
ID: 1542551
the problem is minor. tell the user...thats just the way it is.
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 6

Expert Comment

by:TheHub
ID: 1542552
the problem occurs most often when the file is uploaded to an http server and not the correct ftp server. people do this if there is no ftp server available.
0
 

Expert Comment

by:chrisxx
ID: 1542553
The fix is simple: just use an _ (underscore) in place of a space
0
 

Expert Comment

by:chrisxx
ID: 1542554
The fix is simple: just use an _ (underscore) in place of a space
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to extract the music from an iPod with freeware. Freeware      Not for iTouch or iPhone only works under Windows. iDump            http://www.softpedia.com/get/IPOD-TOOLS/Multimedia-IPOD-tools/iDump.shtml Sadly, newer versions of iDump are no longer fre…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question