Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

Coldfusion 10 return a ISO-8859-1 string from a restful web service?

$
0
0

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!


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>