special chars

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pradeepjain
    Contributor
    • Jul 2007
    • 563

    #1

    special chars

    hii.

    i have a db tables which i am exporting to csv or other formats . i will be making it format like name and value . so i need 3 special chars which will separate the 2 . like $name*pradeep% . so which are the special chars which i can use for this purpose ,
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hey.

    Why not just use the standard CSV format?
    [code=text]"name","Jac k Black"
    "text1","Te xt with a \" quote",
    "something else","etc..."
    [/code]
    The first column there being the name, and the second one the value.

    In any case, it doesn't really matter which characters you choose. You would just have to escape actual occurrences of those characters in the values.
    Like, if you wanted to use "a", "B" and "c" as your separators:
    [code=text]an\ameBJa\ck \Blackc[/code]
    Remember, in whichever code you use the data, you would have to unescape the data after you have parsed it in.

    Comment

    Working...