Double-Byte Characters and CFQueryParam

One of the challenges we’ve had at my present company is using CFQueryParam with double-byte characters. Basically, we couldn’t. A recent post on the Phoenix CFUG list prompted me to actually read the live docs on the subject. I found a comment there that pointed out the string format option in the advanced data source settings.

By checking the “String Format” box (the one that says “Enable Unicode for data sources configured for non-Latin characters”) you can now send double byte characters successfully using CFQueryParam.

CF_Administrator_StringFormat

I am not sure when that option showed up. It is not documented in any of the on-line or printed manuals I have on administering Cold Fusion. The screen shots in the printed manual I have for MX 6 don’t even have that option…so it showed up at 6.1 or later. All I know is that it IS available in 6.1 + Updater.

It all makes sense now….but the lack of documentation is why it escaped me before. I wish I knew why its not documented. I also would like to know why its not checked by default….perhaps a performance or compatibility issue? If anyone out there knows more about this setting….please comment!

3 Responses to Double-Byte Characters and CFQueryParam

  1. John Blayter says:

    This is one thing that buged me about storing the double byte characters in the database and not being able to pass the values in via CFQUERYPARAM. I know that you can run the contents through a UDF to look for a SQL injection but that still bugged me. Do you still need to do the whole N’ thing before the CFQUERYPARAM

  2. wulimaster says:

    Nope. Just use CFQUERPARAM…no “N” required. I still have not heard anything else. I want to know if there is some drawback. Perhaps there is a performance hit. I would need to test to know for sure…in all my free time I might do that.

  3. плешка says:

    по моему мнению: шикарно!!

Leave a comment