0 Replies Latest reply on May 5, 2014 8:33 AM by spoliskey

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

    spoliskey

      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!