I am currently setting several variables:
<cfset printPage = "YES">
In the end, when I print these variables, everything I try to set to "YES" is printed as "true." Everything that is set to NO is displayed as false. I do not mind using the function YesNoFormat. In fact, I could use this feature in this application, but at the same time I would like to know if ColdFusion really stores the words “YES” and “NO” in memory or converts them to a logical format backstage.
If CF stores my variables exactly as I declare them, how would I like to get these variables as strings? If CF somehow modifies the variables, are there any special characters or keywords that I could use to make it store the variables as strings?
Thanks to everyone who commented / replied. I experimented and read a bit, and it seems that the serializeJSON function automatically converts Yes to True and No to false. I either need to solve this problem in my javascript, or I can add a space in the affected properties to get around this behavior.
source
share