Re: plus sign giving me problems in convertchars

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 60892
interpreted = N
texte = 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/ Associated Messages, from the most recent to the oldest:

    
  1. Re: plus sign giving me problems in convertchars ( Terry Wilson 2005)
  2. Re: plus sign giving me problems in convertchars ( Terry Wilson 2005)
  3. Re: plus sign giving me problems in convertchars ( John Peacock 2005)
  4. Re: plus sign giving me problems in convertchars ( Alain Russell 2005)
  5. Re: plus sign giving me problems in convertchars ( Kenneth Grome 2005)
  6. plus sign giving me problems in convertchars ( Terry Wilson 2005)
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/ Kenneth Grome

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:

Re2: frames & carts (1997) WebCatalog 2.0 & WebDNA docs in HTML ... (1997) blank page from template (1997) hyperlinking unique input strings on the fly when displaying in HTML (2000) HTML editing and webcatalog (2000) HELP WITH DATES (1997) WebCommerce: Folder organization ? (1997) Ok here is a question? (1997) WebCat 3.0 License for sale.... (2000) Next X hits (1996) Re:Emailer tracking (1997) IIS4 & Password Authentication, request example (1998) searching problem (1998) Calendar using WebCatalog? (1997) Country & Ship-to address & other fields ? (1997) append db weirdness (1999) Experience with creating real dynamic solutions?????? (1998) GuestBook example (1997) SiteEdit Pro Update Announcement (1997) normal users.db calls ... (1998)