Solved

Use Delete Key as Delimiter

Posted on 2011-03-03
3
393 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The technique is by far very Simple! How we can export the ColdFusion query results to DOC file?  Well before writing this I researched a lot in Internet but did not found a good Answer anyways!  So i thought now i should share my small snippet w…
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
A short film showing how OnPage and Connectwise integration works.

911 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

23 Experts available now in Live!

Get 1:1 Help Now