Me Me Me! I can answer this one (woo hoo! I can be helpful at last. I was
beginning to wonder...)

this is a simple solution to the problem. It's the char sets used (eg
unicode). This has been giving me the shits since my ASP days.

there are 2 sort of single and double quotes. try this to see what I mean

<cfset sym = "&##">
<cfset bol = ";">
<cfoutput>
<table>
<cfloop index="ii" from="32" to="191" step="1">
<tr><td>#ii# </td><td> #chr(ii)# </td><td> #sym & ii & bol#</td></tr><tr>
</cfloop>
</table>
</cfoutput>

char(34) (double quote or "talkies") is being replaced/confused with
char(147) and char(148) which in most HTML fonts is unprintable. simillarly
char(39) (single quotes) might really be char(145) or char(146).

For my needs I pump any text output (file, db) thru this function and that
helps. Neither HTMLEditFormat() or HTMLCodeFormat() provided me with exactly
what I wanted. You could also modify your stored text to convert chars
145-148 to their common equiv's.

<cfscript>
function barrysHTMLoutputFormat(theText)
// formats text for HTML display
{
  theText = trim(theText);
  theText = Replace(theText, "&","&amp;","ALL"); // use HTML "ampersands"
  theText = Replace(theText, "<","&lt;","ALL"); // use HTML "less-than"
  theText = Replace(theText, ">","&gt;","ALL"); // use HTML "greater-than"
  theText = Replace(theText, chr(13) & chr(10),"<br />","ALL"); // use break
for new lines
  theText = Replace(theText, chr(145), chr(39),"ALL"); // undisplayable
"single quote open"
  theText = Replace(theText, chr(146), chr(39),"ALL"); // undisplayable
"single quote closed"
  theText = Replace(theText, chr(147), chr(34),"ALL"); // undisplayable "dbl
quote open"
  theText = Replace(theText, chr(148), chr(34),"ALL"); // undisplayable "dbl
quote close"
  theText = Replace(theText, chr(150), chr(45),"ALL"); // undisplayable
"short hyphen"
  theText = Replace(theText, chr(151), chr(45),"ALL"); // undisplayable
"long hyphen"
  theText = Replace(theText, chr(133), "&##133;","ALL");// use HTML
"elipsis"
  Return theText;
}
</cfscript>

by the way, if anyone finds an improved UDF for this, please let me know.

cheers
barry.b



-----Original Message-----
From: Steve Onnis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 13 August 2003 1:45 AM
To: CFAussie Mailing List
Subject: [cfaussie] RE: Get Rid Of Characters...


Defined "gobbly gook"

Steve

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Carl
Vanderpal
Sent: Wednesday, 13 August 2003 1:34 AM
To: CFAussie Mailing List
Subject: [cfaussie] Get Rid Of Characters...


Hello CFAussie,

  Using a copy of So-Editor-Lite, but the thing is giving me a hard
  time... if you put apostrophes and enter it into (SQL) [FieldType]
  is Text, 4 times out of ten it puts all gobbly gook characters in.
  When you delete characters once it is in it is all ok... any ideas??
  or is there a better fre^e CFMX content editor that works without
  the special characters??


Best regards,
Carl Vanderpal
Po Box 3462 Dural, NSW 2158
mailto:[EMAIL PROTECTED]


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to