Copy link to clipboard
Copied
Hi All,
Is there anyway for a Restful web service function to return a "ISO-8859-1" charset string instead of an UTF-8 charset?
I have tried this in my function but it isn't working.
<cfcomponent rest="true" restPath="/TestString">
<cffunction name="TheTestString" access="remote" returnType="String" httpMethod="GET">
<cfset res="Hey guys, I hope you like #trim(TheTestString)#">
<cfset TempString = CharsetDecode(res,"ISO-8859-1")>
<cfset ReturnString = CharsetEncode(TempString ,"ISO-8859-1")>
<cfreturn ReturnString >
</cffunction>
</cfcomponent>
Any ideas?
Thanks!
Have something to add?