elixireu
elixireu

Reputation: 275

display ASCII data in ColdFusion from a <cfset> parameter

I have set up a language file rather than in the database, so I have for example in the language file…

<cfset lang_back_to_results = "< retour aux résultats">

So I have in my cfm page…

<cfoutput>#lang_back_to_results#</cfoutput>

This works fine but it does not correctly display the accent, so I tried to use ASCII and CHR inputs in the language file but with no success…

chr(233) &eacute;

Any ideas on how to display the text correctly?

Upvotes: 1

Views: 235

Answers (2)

duncan
duncan

Reputation: 31930

You need to have this in the top of your 'language file', and whatever .cfm file you're including it in:

<cfprocessingdirective pageencoding="utf-8" />

See:

Upvotes: 4

Matt Busche
Matt Busche

Reputation: 14333

do you have your content-type set?

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

Upvotes: 1

Related Questions