Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > CSDb Bug Reports > Lots of % codes in filenames
2013-04-20 00:52
dink
Account closed

Registered: Mar 2012
Posts: 30
Lots of % codes in filenames

Lately it seems like most of the files downloaded have %## translation codes in them, for example, look at the file name in this release: Plumb Crazy +1D (Loadstar)

Could it be that the uploading script isn't properly translating the filename when it gets uploaded?
2013-04-20 02:26
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
yeah, bug. when you dl, the codes become part of filename.
this server is OOOOOOLD

that % doesnt get fixed before entering the db
2013-04-20 09:14
Beastifire
Account closed

Registered: Mar 2013
Posts: 40
URLs aren't supposed to have arbitrary characters in them. You're supposed to encode weird ones with this method, so this is arguably correct. Don't remember what the RFC document no for URLs is, but that should be possible to look up.
2013-04-20 12:51
bepp

Registered: Jun 2010
Posts: 268
Agree that it's good practise to encode the url but encoding the text of the link doesn't make any sense. I think it's just a code slip.
2013-04-20 15:04
chatGPZ

Registered: Dec 2001
Posts: 11523
i think that happens because the text in the link shows the actual filename on the (hidden) ftp. even that is argueable correct (yet ugly, agreed :))
2013-04-20 21:25
Krill

Registered: Apr 2002
Posts: 3098
Arguably, this is indeed ugly. URLs can have arbitrary characters in them, but they will get translated to UTF8-percent-encoding and others by your user agent when sent over the wire. So when saving a file, having low-level URL encoding garbage in the filename is... well, ugly. :)
2013-04-21 00:19
Burglar

Registered: Dec 2004
Posts: 1137
its fixable btw, but it'll be an annoying task, and different browsers will handle stuff differently too.

so, just dont use weird chars in ur filenames ;)
2013-04-21 09:04
Fred

Registered: Feb 2003
Posts: 298
It's very easy to fix. Just decode the URL for the download display link.

You can do it via Javascript with decodeURIComponent or use the urldecode function in PHP.
2013-04-21 12:18
Perff
Administrator

Posts: 1686
Added the sugested urldecode for displaying the link.

Also added the urldecode to the script that fetches the file form the fileserver and sends it to the user. Not sure if that will mess up the download in certain cases - if it does please let me know. :)
2013-04-21 17:24
chatGPZ

Registered: Dec 2001
Posts: 11523
while at it, add a TRIM to all input boxes, its annoying as fuck if you paste something in there and have to remove leadin or trailing spaces to make some search query work :) (now that i say it, i see its fixed in the sidebar, eh =D)
2013-04-21 17:47
Perff
Administrator

Posts: 1686
Quote:
while at it, add a TRIM to all input boxes

Better now? :)

Is there anywhere where it might seem fit NOT to trim input?
 
... 6 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Krill/Plush
REBEL 1/HF
Scooby/G★P/Light
Guests online: 165
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top NTSC-Fixers
1 Pudwerx  (10)
2 Stormbringer  (9.7)
3 Fungus  (9.6)
4 Booze  (9.5)
5 Grim Reaper  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.18 sec.