tracker issue : CF-3342142

select a category, or use search below
(searches all categories and all time range)
Title:

RESTful web services do not correctly handle character encoding

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 10/07/2012

Components: REST Services

Versions: 10.0

Failure Type: Data Corruption

Found In Build/Fixed In Build: Final / 285059, 285321

Priority/Frequency: Critical / Most users will encounter

Locale/System: English / Win All

Vote Count: 1

Problem Description:
See http://adamcameroncoldfusion.blogspot.co.uk/2012/10/probable-significant-bug-in-coldfusion.html

Steps to Reproduce:
See http://adamcameroncoldfusion.blogspot.co.uk/2012/10/probable-significant-bug-in-coldfusion.html

Actual Result:
See http://adamcameroncoldfusion.blogspot.co.uk/2012/10/probable-significant-bug-in-coldfusion.html

Expected Result:
For it to work properly.

Any Workarounds:
No, none.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3342142

External Customer Info:
External Company:  
External Customer Name: Adam Cameron.
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

I would like to add to this. I am developing a Hebrew Flash Card app, and was hoping to return query results via CF 10 rest for each level. component rest=true restpath="HebrewFlashCardAPI" { pageencoding "UTF-8"; remote query function getStuff() httpmethod="get" restpath="1" { return getData(); } private query function getData() { var qry = new Query(datasource="TPDN",sql="select * from tblHebrew").execute().getResult(); return qry; } } This code returns ??? instead of the expected Hebrew, which is saved to my MySQL database (verified) in UTF-8. Tried a variety of sources. Executing the rest function as if it were a remote method does indeed return the expected Hebrew, so it feels like a failure. This bug has been open and unverified for quite a while. Am I understanding there is no motivation to fix it?
Comment by External U.
17691 | May 07, 2013 10:27:07 AM GMT
The page encoding is taken care while serializing/deserializing of ColdFusion object. When a ColdFusion object is serializied, if the charset is present in the Accept header of the request, it is used. If it is not not present in the Accept Header, the default encoding of the server is used to serialize. Also the charset is set in the Content-Type header of the response. When desrializing to ColdFusion object, the charset is used from the HTTP header if it is present. Otherwise default encoding charset of the server is used. Need to verify the test cases which uses Form data.
Comment by Paul N.
17692 | June 07, 2013 09:08:33 AM GMT
UTF-8 is very important. Please handle international characters correctly.
Vote by External U.
17694 | August 26, 2013 06:41:38 PM GMT
Thanks for the feedback Paul! -- Adam
Comment by External U.
17693 | January 22, 2014 08:42:51 AM GMT