Solved

ColdFusion  Chr Encode Format

Posted on 2009-05-06
3
825 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
[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: 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

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