Skip to main content
Inspiring
June 15, 2009
Question

Replace accented characters with HTML code (cffile)

  • June 15, 2009
  • 1 reply
  • 953 views

I am using cffile to generate an HTML file - however, many times I have accented characters that end up being little boxes when I open the HTML file. For a quick fix, I usually just convert the special characters with the actual code (i.e. é) then it is fine. However, I would much rather have the application convert it for me. I tried to use the REReplace function after I pull the data from the query,

<cfset title = "#REReplace(queryinfo.title, "é", "&eacute;", "ALL")#">

but this isn't working....does anyone have any other ideas?

Thank you.

    This topic has been closed for replies.

    1 reply

    Inspiring
    June 15, 2009

    boxes simply mean the browser can't render that char with the given font. that

    could either be wrong font or sometimes a slight encoding problem. what encoding

    are you using?

    creeloveAuthor
    Inspiring
    June 15, 2009

    I changed it from UTF-8 to windows-1525 in the meta-data and it worked fine....thanks for pointing me in the right direction!!