Skip to main content
Inspiring
July 16, 2007
Question

valid delimiter list

  • July 16, 2007
  • 3 replies
  • 732 views
Does anyone have a list of valid delimiters that won't natively cause coldfusion to error?

I'm trying to convert a structure recursively that can contain other structures to a list.

I have this at the moment.
<cfset var delimList = "|,@,$,%,^,-,+">

Is there more? Obviously I'd have to ban/escape anything that used them.
Thanks
    This topic has been closed for replies.

    3 replies

    Inspiring
    July 17, 2007
    I'll take a look. By the way, why are you avoiding arrays?
    Chuck1411Author
    Inspiring
    July 17, 2007
    CF structures are just arrays with names for index's, maybe a bit faster to use arrays if you need a numerically indexed 'array'.

    I meant by the way, valid delimiters being those that don't make CF barf on seeing them, IE # < >, etc to name a few.
    Inspiring
    July 17, 2007
    > CF structures are just arrays with names for index's
    Conceptutally, yes. But in terms of implementation, no.

    > I'm trying to convert a structure recursively that can contain other structures to a list.
    Since a structure contains key/value pairs do you mean two lists? A list of keys only or values only, or something similar to a url query string: key1=value1,key2=value2 ?

    >> those that don't make CF barf on seeing them, IE # < >, etc to name a few.
    Typically you always need to escape # signs. But using a < or > alone won't necessarily cause a CF error. It depends on how you're using them. Can you give an example of what's causing an error?

    Chuck1411Author
    Inspiring
    July 17, 2007
    Not at the moment, because I'm avoiding those.

    But here is the code I'm using to save nested structures, it doesn't quite work yet, but it'll give you the idea I'm after.
    Inspiring
    July 16, 2007
    I would imagine "valid delimiters" depend on the data itself, not ColdFusion. You could try using a non-printable character, but obviously that won't eliminate the problem if the values contain the character you've selected. Have you considered using arrays instead?