Thanks Dinner.  
I found this page:
http://livedocs.adobe.com/coldfusion/7/htmldocs/00000352.htm

Which confirms some of what you said.

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.

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"

.... 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"...  ?)

"To change the declaration to specify another encoding, use the Replace
function.... <cfset mynewvar=replace(myvar, "UTF-8", "utf-16")>"  

.... 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?

Even in their example using cfxml wrapped in a cfsavecontent, they STILL
do the replace().  That just doesn't seem right.  

I want my money back.

~Brad


-----Original Message-----
From: Dinner [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 13, 2007 7:19 PM
To: CF-Talk
Subject: Re: setting xml encoding

<cfcontent type="text/xml charset=UTF-16">

Or <cfprocessingdirective pageencoding="UTF-16" />

I think.

See (cf 6):
 http://preview.tinyurl.com/yuqgva

Or more recent docs

On 6/13/07, Brad Wood wrote:
> Hey, this ties back to my post the other day



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281182
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