Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to download the notes from the school website, it is a easy task. But the file I downloaded always get a ugly filename on OS X, such as D1.5%20-%20Software%20testing%20strategies, it should be D1.5 - Software testing strategies originally. How can I solve this problem?

I have already looked at the iconv command, but it only changes the encoding of the file's content but not the encoding of the filename.

share|improve this question
3  
The %20's ( 20 hex, or decimal 32) is the ASCII code for white space. I suspect it is more a browser problem than a OS X problem. –  Hennes Jun 6 '13 at 18:25
    
Which browser are you using? –  Nick Jun 6 '13 at 18:35
add comment

2 Answers

This happens because the %20 is an unicode equivalent of the whitespace.

Have you tried renaming the file via the file browser or the terminal after you downloaded it?

share|improve this answer
add comment

If you just want to fix the filenames and replace %20 with a single space, open up a Terminal, navigate to the folder in question, and run:

for f in *; do mv -- "$f" "${f//%20/ }"; done

The real issue would be the browser not saving the file correctly – try a different browser to see if that's really the problem.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.