Chris,

Thanks, I was contacted offlist by someone with the same suggestion,
and I've got it to work successfully under CF4 now.

The solution was to save the file using CFHTTP and the path/file
parameters, and then read it into a variable using <CFFILE ACTION="read">.
Just in case, I saved it as a .txt within CFHTTP, but I don't
think it was necessary.

Pity about the server hit on the drive, unavoidable using CF4
unfortunately. I'm told the bug was fixed in CF4.5.1. My dev box
uses CF5 which was why I didn't catch the bug until testing online.

Cheers,

- Ian

Chris Davis wrote:
> 
> Can you write the file to disk and re-open using <CFFILE ...> or using <CFHTTP ...> 
>and <CFCONTENT type="text/plain"
> ...>?
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Ian Chia
> Sent: Monday, December 17, 2001 5:22 AM
> To: [EMAIL PROTECTED]
> Subject: [cf-xml] Converting non-ASCII MIME to ASCII XML
> 
> Hello,
> 
> I'm having trouble grabbing an ASCII file using CFHTTP
> that's set with a non-text MIME type, and outputting that
> as XML.
> 
> The files are pdb files (public molecular database entries)
> that have a non-ASCII MIME. However, they're just plain text
> files. On a CF4 server, when I to parse and reformat the file
> with cfhttp.FileContent, it returns:
> 
>   The requested file is not ASCII text and can not be rendered.
> 
> Trying to coerce it into a string using MID doesn't work.
> It still comes back with the same message. I'm sure a CF5 ToString()
> would do the trick, but the target server is a CF4 server.
> 
> Using the same code on my development machine with a local webserver,
> it works fine if the pdb MIME is set to a text type. However, I can't
> set the MIME for the online files as they come from a wide variety
> of public servers.

-----------------------+
cf-xml mailing list
list: [EMAIL PROTECTED]
admin: [EMAIL PROTECTED]
home: http://torchbox.com/xml

Reply via email to