[thelist] CFMX problem - HTML output cut off - and character encoding
Jeff Howden
jeff at jeffhowden.com
Wed Jul 16 02:48:49 CDT 2003
michael,
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Buffington, Michael
>
> There is nothing wrong with doing this:
> <cfset setEncoding("form","utf-8")>
>
> Vs.
>
> <cfscript>
> setEncoding('form', 'utf-8');
> </cfscript>
>
> [snip]
> rather than use the <cfset> tag for a rather hackish
> function call like this, i'd recommend using a
> <cfscript> block. to me it just seems wrong to not
> use the <cfset> for assignment.
> [/snip]
>
> Both quite literally do the exact same thing, and it's
> safe to suggest that you don't benefit from any
> performance gain for dropping into cfscript for a
> single function call. No matter of right or wrong here,
> they're both right.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
it's *quite* wrong if you want your code to be portable to versions prior to
cfmx. it's also semantically wrong to use <cfset>, a tag used for
assignment, for a simple function call. besides, the <cfset> version just
looks like it's missing something. i get the jeebies everytime i see it.
if you're not going to assign the results of a function call to something,
then don't use the <cfset> tag.
fwiw, there are a few things like this in cfmx that i *really* don't like
because they break the semantics of some of the cf tags.
just my 2¢,
.jeff
Jeff Howden - Web Application Specialist
Résumé - http://jeffhowden.com/about/resume/
Code Library - http://evolt.jeffhowden.com/jeff/code/
More information about the thelist
mailing list