Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Replace accented characters with HTML code (cffile)

Explorer ,
Jun 15, 2009 Jun 15, 2009

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.

886
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 15, 2009 Jun 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 15, 2009 Jun 15, 2009
LATEST

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!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources