Solved

Use Delete Key as Delimiter

Posted on 2011-03-03
3
396 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

PROBLEM:  How to open a cfwindow or run a function on double click of a cfgrid row. One of my clients wanted to be able to double click on a row item to get more detailed information about a transaction and to be able to modify the line items i…
Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 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