Filtering Strange characters in text

Stephen Quinn Barncard stephenREVOLUTION at barncard.com
Tue Jul 29 14:46:01 EDT 2003


I have a one-off app made in Rev (imported from HC and improved) that 
imports and parses a Eudora mailbox, then allows me to further edit, 
rank, and fix bad wrapping in text, then insert the html code in a 
html document. It also has a filtering function that gets rid of odd 
characters that won't look good in browsers.

Up until now, I've just used the Replace command multiple times with 
each character to lose to do the cleaning - rev is so fast it's 
instantaneous. However there seems to be at least one character that 
refuses to be filtered using the Replace command. This is the 
character:    Ê   (ascii $E6 or 230 dec).

This character appears as a space in the Rev field I've created, and 
the field font is Monaco. However somehow these imbedded characters 
still end up in my html document (I am NOT using HTML text in the 
field - the HTML tags are created in the last stage before being 
inserted into the HTML text file.

I can make this work in TexEdit - it can replace the offending 
character with spaces like I need. But not the Replace command in Rev.

here's my usage:

put Replace("ñ"," ",theBlock) into theBlock

this doesn't work either...
put Replace(numToChar(230)," ",theBlock) into theBlock

I guess I'll try Regex next. But this should work!



More information about the use-livecode mailing list