Re: plus sign giving me problems in convertchars
This WebDNA talk-list message is from 2005
It keeps the original formatting.
numero = 60893
interpreted = N
texte = or you can just do[text]newfilename=[grep search=[^0-9a-zA-Z\.]&replace=][origfilename][/grep][/text]This will strip all non alphanumeric charactersAOn 01/02/2005, at 6:18 PM, Kenneth Grome wrote:> It's probably a platform-specific problem, but even if it isn't, plus > signs do not belong in file names.>> If I were you, I would use the cart tag to create a new file name on > your server ([cart].jpg) instead of using the same name for the file > that the visitor happened to use on his computer.>> Then if you or your visitor don't like [cart].jpg as a file name, give > the visitor a text field into which he should type the name he *wants* > for the file, and use your convertchars on the text field value ... > then replace the [cart].jpg file name with the convertchars-corrected > value from the text field.>> Sincerely,> Kenneth Grome> www.kengrome.com>> P.S. You might also try using %2B instead of + in the convertchars > database, although I really don't think this will make any difference > ...>>>>>>> I have a conversion db called noillegals.db that I run filenames >> (minus the extension) through when uploading images. It strips out !, >> @, +, $, spaces, periods, commas, etc by converting them to nothing. >> It works fine, except for a filename with a + in it. Is there >> anything special about a + sign that webcat interprets differently >> internally? Not only does it not strip the +, but when it finally >> writes the record to the DB, it changes the + to a space. So I get >> blahblah+blah.jpg written to disk, and blahblah blah.jpg written into >> the DB. Even after a good night's sleep, I'm stymied.>>>> noillegals.db>> fromto>>
>> .>> +>> =>> #>> etc. for the usual suspects>>>> [text]newfilename=[convertchars >> db=^noillegals.db][origfilename][/convertchars][/text]>>>> Then later in the page, [newfilename].jpg is used in a [shell] with >> Imagemagick to set the final file to disk, and in a [replace] to >> populate my DB. Convertchars is only used the one time in the >> beginning.>>>> Thanks,>> Terry>>>> ------------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://webdna.smithmicro.com/>>> -- >> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
or you can just do[text]newfilename=[grep search=[^0-9a-zA-Z\.]&replace=][origfilename][/grep][/text]This will strip all non alphanumeric charactersAOn 01/02/2005, at 6:18 PM, Kenneth Grome wrote:> It's probably a platform-specific problem, but even if it isn't, plus > signs do not belong in file names.>> If I were you, I would use the cart tag to create a new file name on > your server ([cart].jpg) instead of using the same name for the file > that the visitor happened to use on his computer.>> Then if you or your visitor don't like [cart].jpg as a file name, give > the visitor a text field into which he should type the name he *wants* > for the file, and use your convertchars on the text field value ... > then replace the [cart].jpg file name with the convertchars-corrected > value from the text field.>> Sincerely,> Kenneth Grome> www.kengrome.com>> P.S. You might also try using %2B instead of + in the convertchars > database, although I really don't think this will make any difference > ...>>>>>>> I have a conversion db called noillegals.db that I run filenames >> (minus the extension) through when uploading images. It strips out !, >> @, +, $, spaces, periods, commas, etc by converting them to nothing. >> It works fine, except for a filename with a + in it. Is there >> anything special about a + sign that webcat interprets differently >> internally? Not only does it not strip the +, but when it finally >> writes the record to the DB, it changes the + to a space. So I get >> blahblah+blah.jpg written to disk, and blahblah blah.jpg written into >> the DB. Even after a good night's sleep, I'm stymied.>>>> noillegals.db>> fromto>> >> .>> +>> =>> #>> etc. for the usual suspects>>>> [text]newfilename=[convertchars >> db=^noillegals.db][origfilename][/convertchars][/text]>>>> Then later in the page, [newfilename].jpg is used in a [shell] with >> Imagemagick to set the final file to disk, and in a [replace] to >> populate my DB. Convertchars is only used the one time in the >> beginning.>>>> Thanks,>> Terry>>>> ------------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://webdna.smithmicro.com/>>> -- >> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Alain Russell
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
WCS Newbie question (1997)
Introduction/Tutorial/QuickStart (1997)
Integration with SQL (1997)
WC2b15 File Corruption (1997)
creating a ShipCosts database (1997)
WC Database Format (1997)
searchable list archive (1997)
form data submission gets truncated (1997)
webcat and OS 8 (1997)
GuestBook example (1997)
searching by part of the date information (1999)
corrupted images (2002)
Beta (?) version of WebCatalog 2.1 (1998)
Associative lookup style? + bit more (1997)
A *secret* new webdna tag !!! (1999)
catching WebDNA error messages (2003)
multiple databases (1997)
Line ending nuisance (2005)
Claris HomePage messes up the code (1997)
Webcat & SIMS (1998)