I think, you gave up too early.  This is how I would do this.

Version 1.
Use another tool to get the stuff from the server.  Not a browser or <cfhttp>.
It must be able to save your stream, as an unchanged byte stream without any
conversion to a disk file.  So the number in the Content-Length would exactly
the same, as the length of the file.  Don't want to advertise anything on this 
list.
You can easily find such tools.  After that you can conduct clean experiments
using <cffile>.  Obviously, this must be the case, when <cfhttp> truncates
the data.

stPos=1
<cfloop>
- Use ASC() to find the first character with the code above 127, starting from 
stPos.
   <cfloop>
      - Go to some Web-site that has utf-8 table (like Wikipedia) and look 
whether this
        is a valid escape character.  If not, break - it is not valid utf-8 
stream.  Report
        error to your provider.
    -  Get the code of the next character. See, if this is an escape or data 
char.
        Consult the table above.  Break with utf-8 error, as before, if sequence
        is not valid.
     - End this loop, if a data char was read.  Continue, if an escape char was 
read.
    </cfloop>
    utf-8 sequence is valid.  Modify stPos to set it after the valid sequence.
    Continue.
</cfloop>
utf-8 stream is valid.  Report error here and to Adobe.

Version 2
Enforce some 8-bit encoding in your <cfhttp> call, like "iso-8859-1".
Save result in a file using <cffile> with the same charset.  This suppose
to produce unchanged 8-bit stream, but I am not 100% sure (depends
on what exactly CFHTTP is doing).  Repeat process above.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344789
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to