Hi Matthew,
interesting problem that. What you need is the new charset attribute for the
cffile tag. You also need to add a cfprocessingdirective tag to the file you
are writing. This should work:
<p>Writing <cfoutput>#chr(37329)#</cfoutput> ( chr(37329) ) to a file . . .
</p>
<cffile charset="UTF-8" action="WRITE" file="#expandpath("file.cfm")#"
output="<cfprocessingdirective pageencoding=""UTF-8"">#chr(37329)#"
addnewline="Yes">
<p>cfincluding the file . . . <cfinclude template="file.cfm"></p>
> -----Original Message-----
> From: Matthew Walker [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 10 July 2003 4:07 p.m.
> To: CF-Talk
> Subject: international character sets and writing to physical files with
> CFMX
>
> I'm trying to write form data to a physical file, and I'm finding that
> Japanese characters are turning into question marks.
>
> Here is a simplified runnable version of my situation (chr(37329) is a
> Japanese character):
>
> <cfoutput>
> <p>Writing #chr(37329)# - chr(37329) - to a file . . .</p>
> </cfoutput>
>
> <cffile action="WRITE" file="#expandpath("file.cfm")#"
> output="#chr(37329)#"
> addnewline="Yes">
>
> <p>cfincluding the file . . . <cfinclude template="file.cfm"></p>
>
> I've tried various (although not necessarily correct) combinations of
> cfprocessingdirective, cfcontent, and setencoding() to no avail. Any ideas
> or pointers?
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics.
http://www.fusionauthority.com/signup.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4