Skip to main content
Participant
June 22, 2009
Question

ColdFusion and Flex: Unicode missmatch

  • June 22, 2009
  • 1 reply
  • 585 views

Hi there,

got a serious problem now using cyryllic chars in my flex app. I try to send data via URLRequest (Method:Post, Content-Type:"text/xml") to a ColdFusion Page (UTF-8 using Coldbox). Everything is alright as long as I use standard chars, but cyryllic chars cannot be submitted.

In ColdFusion I write the result of getHttpRequestData().content into a file and get the following content: Разнообразные �?по�?обы применени�

Does anyone know a solution for this? I already tried setEncoding, both form and url to utf-8. It seems as is the protocol, used to transmit the data, does not support cyrrylic chars.

Thanks!

Eddie

    This topic has been closed for replies.

    1 reply

    Known Participant
    June 23, 2009

    Is the characters are displaying correctly in Flex App. If not font (symbols) has to be added in embedded font swf.There after clear the broswer and check whether it is displaying correctly in the flex app.Then it would reach in CF end also

    Participant
    June 23, 2009

    I now fixed the problem. The reason was, if you do not specify encodings for either URL or form variables, coldfusion uses the Java UCS-2 representation of unicode characters*, which is very close to unicode.

    If i set encoding of Form Variables to "UTF-8", this results in a very clean text without mismatch.

    <cfset setEncoding( "form", "UTF-8" )>

    Thanks for your help!

    *coldfusion mx doku/toString(): "New in ColdFusion MX: ColdFusion supports the Java UCS-2 representation of Unicode character values 0-65535. (ColdFusion 5 and earlier releases supported ASCII values 1-255.)"