Solved

Use Delete Key as Delimiter

Posted on 2011-03-03
3
392 Views
Last Modified: 2012-05-11
I am trying to upload and parse a csv file.  I am told it is delimited by the DELETE key.

Each field is delimited by character 127, the delete character. Hold alt then type 0,1,2,7 in sequence will type the delete character or use "x7F" in most programming languages.

I have tried some of this and it isn't working.  Anyone have any suggestions on how to use the delete character as a delimiter?
0
Comment
Question by:theideabulb
  • 2
3 Comments
 
LVL 52

Accepted Solution

by:
_agx_ earned 500 total points
ID: 35031284
What have you tried? If it's ascii character 127, you should be able to use it as your loop delimiter

<cfloop list="#yourCSVContent#" delimiter="#chr(127)#" index="line">
    ....
</cfloop>
0
 
LVL 52

Expert Comment

by:_agx_
ID: 35031314
More specifically, break it into lines as usual ie chr(10) / chr(13). Then break it into columns on the delete character ie chr(127)

<cfloop list="#theCSVContent#" delimiter="#chr(10)##chr(13)#" index="line">
    <!--- preserve missing fields --->
    <cfset columns = listToArray(line, chr(127), true)>
    ...
</cfloop>
0
 

Author Closing Comment

by:theideabulb
ID: 35031371
i wasn't trying this #chr(127)#, i was just doing 127 or chr(127) and it kept giving errors.  Thanks for the easy solution.  I am a dummy :)
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article  is about submitting  form through  ColdFusion.Ajax.submitForm to the action page and send a response back in JSON format which later can be decoded using ColdFusion.JSON.decode. By this way you can avoid the usual page refresh for subm…
This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now