> It appears that cfprocessingdirective only applies if I am 
> returning an entire page of nothing but xml and want the 
> encoding of the whole page to be modified.  I am just 
> creating a variable with cfxml.

If you're going to output that variable to the browser as an HTTP response,
you'll need to use CFPROCESSINGDIRECTIVE if you want to use an alternate
character encoding. If you're going to output that variable to the
filesystem, you'll need to use the appropriate CHARSET attribute value with
CFFILE. If you're not going to output the variable, why do you care about
the encoding?

> They also show using cfsavecontent, but I'm a but confused, 
> because even if you do that it appears you can't get away 
> from using the replace function to replace UTF-8 with 
> whatever you want, which to me is about the lamest thing I 
> could imagine. Here is what is says:
> 
> "To convert an XML document object back into a string, use 
> the ToString function, at which time ColdFusion automatically 
> prepends the <?xml version="1.0" encoding="UTF-8" ?> 
> XML declaration"

If you're using CFSAVECONTENT, and not CFXML, to create a string that
contains XML, you will be responsible for adding the XML declaration (and
the appropriate encoding) yourself. You won't have to do the Replace then.

> .... So apparently I have NO CHOICE OR CONTROL over the 
> encoding of my xml doc at the time of its creation.  (Why 
> can't you just do <cfxml encoding="utf-16"...  ?)

Because no one requested that feature?
http://www.adobe.com/go/wish/

> .... WTF, over?  What if my xml string happens to contain the 
> name of an encoding type within it and I DON'T want it to be 
> replaced?

An XML string is not the same as an XML document object. If you just build a
string with CFSAVECONTENT, you can put in whatever XML declaration you want.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

This email has been processed by SmoothZap - www.smoothwall.net


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281194
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to