Re: tabs as delimiters

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 59713
interpreted = N
texte = I'm back on this project. I tried doing what Brian suggests, but apparently you can't replace anything with a true tab, using either grep or convertchars/words. I've gotten around this by prepending a short string to each value when I write to the db, then grepping it out when I display the values on the page. Pretty much a kludge. I would still lobby for a collapse=F parameter to be added for listwords (to do the same thing tabs=t does), or let tabs=t apply to the given delimiter, to a future version. Terry >Use GREP or CONVERTCHARS to turn %1D back into real tabs, then you >can use the tabs=T option. >- brian > >On Oct 9, 2004, at 4:07 PM, Terry Wilson wrote: > >> Thanks again, but using %1D gets me right back where I started >>with the pipe char: empty values collapse. The tab=t parameter is >>for making empty values valid when reading tab-delimited text, but >>as we can see, you can't pull a tab out of a DB field. >> >> I'm going to have to do something different. Shouldn't be hard, >>but I don't see why SMSI couldn't make tabs=T apply to whatever >>delimiter you happen to be using either. >> >> Thanks, >> Terry >> >> Ken wrote: >> >>> Thanks Ken. Yes, now that you point this out, it's perfectly clear. >>> Of course I know you can't put tabs in field - why didn't I see >>> that? I wonder why they use the tabs=t in the first place for >>> listwords? >> >> Probably because listwords isn't always used on database field >> values, sometimes it is used on text that actually has tabs in it. >> But I have never used the optional tabs=t parameter myself so I don't >> really know what it's there for ... >> >>> Now I see what's happening. The stored value is correct, but with >>> another character in place of tabs. Inspecting my database in BBedit >>> I find the tab char is now replaced with /0x1D whatever that is. >> >> So now you can use [listfields delimiters=%1D&words=[yourwordshere]] >> and it should work fine, assuming the rest of your code is okay. >> -- >>> On Oct 8, 2004, at 11:40 AM, Terry Wilson wrote: >>> >>>> When you use a tab as a delimiter in a string so you can split >>>>it apart later via listwords, with blank entries intact: >>>> ------------------------------------------------------------- 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: tabs as delimiters NOT ( Rob Marquardt 2004)
  2. Re: tabs as delimiters NOT ( Terry Wilson 2004)
  3. Re: tabs as delimiters ( John Peacock 2004)
  4. Re: tabs as delimiters ( Terry Wilson 2004)
  5. Re: tabs as delimiters ( "WebDna @ Inkblot Media" 2004)
  6. Re: tabs as delimiters ( Terry Wilson 2004)
  7. Re: tabs as delimiters ( Brian Fries 2004)
  8. Re: tabs as delimiters ( Terry Wilson 2004)
  9. Re: tabs as delimiters ( Kenneth Grome 2004)
  10. Re: tabs as delimiters ( Terry Wilson 2004)
  11. Re: tabs as delimiters ( Kenneth Grome 2004)
  12. Re: tabs as delimiters ( Terry Wilson 2004)
  13. Re: tabs as delimiters ( Brian Fries 2004)
  14. tabs as delimiters ( Terry Wilson 2004)
I'm back on this project. I tried doing what Brian suggests, but apparently you can't replace anything with a true tab, using either grep or convertchars/words. I've gotten around this by prepending a short string to each value when I write to the db, then grepping it out when I display the values on the page. Pretty much a kludge. I would still lobby for a collapse=F parameter to be added for listwords (to do the same thing tabs=t does), or let tabs=t apply to the given delimiter, to a future version. Terry >Use GREP or CONVERTCHARS to turn %1D back into real tabs, then you >can use the tabs=T option. >- brian > >On Oct 9, 2004, at 4:07 PM, Terry Wilson wrote: > >> Thanks again, but using %1D gets me right back where I started >>with the pipe char: empty values collapse. The tab=t parameter is >>for making empty values valid when reading tab-delimited text, but >>as we can see, you can't pull a tab out of a DB field. >> >> I'm going to have to do something different. Shouldn't be hard, >>but I don't see why SMSI couldn't make tabs=T apply to whatever >>delimiter you happen to be using either. >> >> Thanks, >> Terry >> >> Ken wrote: >> >>> Thanks Ken. Yes, now that you point this out, it's perfectly clear. >>> Of course I know you can't put tabs in field - why didn't I see >>> that? I wonder why they use the tabs=t in the first place for >>> listwords? >> >> Probably because listwords isn't always used on database field >> values, sometimes it is used on text that actually has tabs in it. >> But I have never used the optional tabs=t parameter myself so I don't >> really know what it's there for ... >> >>> Now I see what's happening. The stored value is correct, but with >>> another character in place of tabs. Inspecting my database in BBedit >>> I find the tab char is now replaced with /0x1D whatever that is. >> >> So now you can use [listfields delimiters=%1D&words=[yourwordshere]] >> and it should work fine, assuming the rest of your code is okay. >> -- >>> On Oct 8, 2004, at 11:40 AM, Terry Wilson wrote: >>> >>>> When you use a tab as a delimiter in a string so you can split >>>>it apart later via listwords, with blank entries intact: >>>> ------------------------------------------------------------- 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/ Terry Wilson

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:

[countWords]? (1997) WebCatalog Hosting (1996) Extended [ConvertChars] (1997) WC2b15 - [HTMLx]...[/HTMLx] problems (1997) [WebDNA] Middle Question (2015) Cookie Question (1999) [WebDNA] Any way within WebDNA to tell if a file can be modified by current user? (2010) Country & Ship-to address & other fields ? (1997) Auto SKU's (2000) Need relative path explanation (1997) no global [username] or [password] displayed ... (1997) How To question on setting up downloads (1997) Error Log.db --however (1997) RE: Include (1998) WebCat & Liststar ... & Rumpus, too! (1997) WCS Newbie question (1997) form data submission gets truncated (1997) A sendmail warning (2005) Upgrade to WebCat2 from Commerce Lite (1997) [Cart] ... (1997)