Reputation: 979
I have tried a couple different things including urldecode() as well as a few different answers from this question: Decode Numeric HTML Entities in ColdFusion?
For example I have this french text:
Après avoir terminé
I need to convert to the actual french characters, including the space at the beginning to this:
Après avoir terminé
Any ideas? Thanks in advance.
Upvotes: 2
Views: 576
Reputation: 112220
You can use the Apache Commons library to do this:
<cfset input = " Après avoir terminé" />
<cfset utils = createObject("java", "org.apache.commons.lang.StringEscapeUtils") />
<cfdump var=#utils.unescapeHTML(input)# />
(p.s. This was hidden in a comment to my answer on the question you linked to, though I've since edited into the main answer to increase visibility.)
Upvotes: 7