Solved

ColdFusion  Chr Encode Format

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
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 …

738 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