Quantcast
Channel: Adobe Community : Discussion List - ColdFusion
Viewing all articles
Browse latest Browse all 6243

Unable to display Unicode characters

$
0
0

I am receving contents in japnese language from server , and i am unable to display unicode characters.


cfm code:

<cfhttp

          method="post"

          url=" http://localhost/sampleWeb/readLetter.do"

          resolveurl="Yes"

           charset = "utf-8">

          <cfhttpparam type="header" name="accept-encoding" value="deflate;q=0">

          <cfhttpparam name="docID" type="FormField" value="595">

</cfhttp>

 

     <cfset source="#cfhttp.fileContent#">

 

  <cfprocessingdirective suppressWhiteSpace = "yes" pageEncoding = "utf-8">

<cfoutput>

          #html_src#

</cfoutput>

 

</cfprocessingdirective>

   

<cffile action = "write"

    file = "\\cahywr1bigsya03\wwwroot$\cadd_dev\v2\1.html"

              output = "#html_src#">

 

<cfoutput>

          #html_src#

</cfoutput>

 

i have also logged the contents in an html file at server before sending to client. This file when viewed in browser shows japanese characters properly but at client, the received characters does not show japanese instead i get some invalid characters(might be extended ASCII characters)


Browser encoding set to Unicode (utf-8)

 

please suggest how to receive unicode characters from server and display at client browser...

 

 

server side code:

 



response.setContentType("text/html");


response.setHeader("cache-Control","no-cache");




response.setCharacterEncoding("utf-8");


response.setContentType("text/html"); 




response.getOutputStream().write(buffer.toString().getBytes("utf-8"));


response.getOutputStream().flush();


response.getOutputStream().close();



Viewing all articles
Browse latest Browse all 6243

Trending Articles



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