Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using CFOUTPUT to output text fields with strange characters

Status
Not open for further replies.

GAC

Technical User
Mar 19, 2001
2
US
In my database I have a text field that stores comments. I am trying to output
that comment field in my web page. The problem I am running into is this. Some
of the text has weird characters like exlamations (!) and other characters. I believe
that when CFOUTPUT goes to output the text to the screen it see's these characters
as some type of function commands and then does not output the text at all.

How do I get coldfusion to ignore looking at the characters and just output everything
in the text field.
 
i tried with exlamations(!). I am able to output without any problem using cfoutput tag. I know if the field contains the # you will get error. IT can be solved by using replace function like replace(var, "#", "##")or #replace(var, "anyspecialcharacter", "ascivalue for that character")#
 
You're saying the variables aren't displayed, or is there an error? If the page loads properly, but the text isn't displayed, then its the browser that's interpreting the characters as code... and not displaying them to the screen.

I've never had a problem like that, unless HTML is interpreting the characters. Try this function to see EVERYTHING:

HTMLeditFormat(variable)

Problems persists, paste some of those field's contents here. Im sure this forum will display the correctly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top