Solved

ColdFusion  Chr Encode Format

Posted on 2009-05-06
3
815 Views
Last Modified: 2013-12-24
Please tell me how to convert the following characters to the format:
Chr(x) where c is a number.

The characters are:
<, >, ', ", (, )
0
Comment
Question by:onaled777
  • 2
3 Comments
 
LVL 52

Accepted Solution

by:
_agx_ earned 500 total points
ID: 24317959
Do you mean get the ascii values?


<cfset badList = "<,>,',"",),(">
<cfoutput>
<cfloop list="#badList#" index="x">
	chr(#asc(x)#)  / result: #chr(asc(x))#<br>
</cfloop>
</cfoutput>

Open in new window

0
 
LVL 63

Expert Comment

by:Zvonko
ID: 24318091
Check this:
<cfset chars=ListToArray("<,>,',"",(,)") >
<cfloop array="#chars#" index="char" >
<cfoutput>#Asc(char)#: #char#<br></cfoutput>
</cfloop>

Open in new window

0
 
LVL 63

Expert Comment

by:Zvonko
ID: 24318097
:)
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

680 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