in windows new lines are CRLF (carriage return line feed) so you should 
do:

<cfset body = ReplaceNoCase(body,"&nbsp;","#chr(13)##chr(10)#","ALL")>

check this:
http://www.neurophys.wisc.edu/www/comp/docs/ascii.html

good luck,

Alexander Sicular
Chief Technology Architect
Neurological Institute of New York
Columbia University 
as867 [at] columbia {dot} edu

-----Original Message-----
From: Kay Smoljak [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 20, 2001 1:47 AM
To: CF-Talk
Subject: Text documents - funny characters


Hi all,

I have text passages that were entered through a web-based interface
using cf_htmlarea_lite. This tag uses the MS dhtml edit thingy, so it
formats everything with copious amounts of pointless markup.

I am pulling this info from the database, and stripping the html tags
out to send it an email as a text attachment. To get rid of the html, I
am using:

<cfset body = ReReplaceNoCase(myQuery.body,"<[^>]*>","","ALL")>

For some reason there tends to be non-breaking spaces where there should
be line breaks, so I then do:

<cfset body = ReplaceNoCase(body,"&nbsp;","#chr(13)#","ALL")>

If I open the resulting file in Notepad, I get strange square characters
between some of the words. If I paste the text from Notepad into Studio,
resave it, and open again in Notepad, the square characters are not
there.

What's the story? Any idea what could be causing this? More to the
point, any idea how to fix it?

Regards,
Kay.



______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to