SerializeJSON doesn't encode UTF8 characters in ColdFusion 9

只愿长相守 提交于 2019-11-29 13:36:10

You need to specify the Character Set in your CFCONTENT tag. I tried this code in Google Chrome without charset and it returned the text correctly. However, FireFox 3.6 returned the incorrect characters you listed.

This correctly returns the UTF-8 characters in Chrome, FireFox and MSIE:

<cfcontent type="application/json; charset=utf-8">

Do the conversion yourself : http://tojson.riaforge.org/ (native) or http://json-lib.sourceforge.net/ (via a Java library)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!