ColdFusion Chr Encode Format

Please tell me how to convert the following characters to the format:
Chr(x) where c is a number.

The characters are:
<, >, ', ", (, )
onaled777Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
_agx_Connect With a Mentor Commented:
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
 
ZvonkoSystems architectCommented:
Check this:
<cfset chars=ListToArray("<,>,',"",(,)") >
<cfloop array="#chars#" index="char" >
<cfoutput>#Asc(char)#: #char#<br></cfoutput>
</cfloop>

Open in new window

0
 
ZvonkoSystems architectCommented:
:)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.