Solved

ColdFusion  Chr Encode Format

Posted on 2009-05-06
3
801 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
json_decode return null? 8 89
Remove Index.php in Codeigniter 12 62
Why addon domain redirects to the original domain? 8 66
Web Site Hosting 10 86
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

773 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