Hi Emmanuel,

You can try this:

<CFSET variable=replacelist(variable,
"á,â,à,ã,ä,Á,Â,À,Ã,Ä,ç,Ç,é,ê,è,ë,É,Ê,
È,Ë,í,î,ì,ï,Í,Î,Ì,Ï,ñ,Ñ,ó,ô,ò,õ,ö,Ó,Ô
,Ò
,Õ,Ö",
"a,a,a,a,a,A,A,A,A,A,c,C,e,e,e,e,E,E,E,E,i,i,i,i,I,I,I,I,n,N,o,o,o,o,o,O,
O,O
,O,O")>


Antonio Mokarzel
[EMAIL PROTECTED]

---
Visite a cidade mais linda da Amazônia
Visit the most beautiful city in the Amazon Rain Forest
http://www.belemdopara.com.br/
---


----- Original Message -----
From: "Emmanuel Crouvisier" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, October 04, 2001 7:41 PM
Subject: Replacing ASCII characters


> I'm pulling out my hair here trying to replace characters with accents
> (ie: é, á, etc) as nothing seems to be working in my replace statem
en
> ts.
>
> I've tried the following, all to no avail:
>
> <CFSET newbody_html = REReplace(#FORM.newbody#, "#chr(130)#", "&eacut
e;
> ",
> "ALL")>
>
> <CFSET newbody_html = Replace(#FORM.newbody#, "#chr(130)#", "&eacute;
",
> "ALL")>
>
> <CFSET newbody_html = ReplaceList(#FORM.newbody#, "#chr(130)#", "&eac
ut
> e;")>
>
> <CFSET newbody_html = ReplaceList(#FORM.newbody#, "é", "&eacute;")>
>
>
> When I try other values for my 'what' and 'with' strings, the replaces
> work fine, ie:
>
> <CFSET newbody_html = ReplaceList(#FORM.newbody#, "A", "a")>
>
> Will successfully replace all letter capital A's with lower case a's.
>
>
> Any idea why replace isn't picking up these ascii characters, in either
> its true value (é) or through the chr(130) notation? (130 is, of cour
se
> ,
> the correct ascii code for this character).
>
>
> What I'm trying to build in the long run is a tag to replace all
> multilingual characters with the HTML equivalent (ie, &eacute; for this
> character), so that these characters will be correctly displayed on all
> browsers.
>
>
> Thank you very much,
>
> Emmanuel Crouvisier
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
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