Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
BKS #1
Problem with Base64 encoding a MS Word Document
I am trying to Base64 encode a MS Word document on CF 7. However, when I try to
decode and save the file and open it in word, it only shows raw characters
instead of the original document. I must be doing something wrong. I tried
using both ToString and ToBinary to decode the document, the results were not
much different. The following is the sample of the code I tried to test this
functionality <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html> <head> <title>Base 64 Decode Test</title> </head> <body> <CFFILE
ACTION='READ' FILE='d:\temp\VendorFieldDefinitions.doc' VARIABLE='strFiledata'>
<CFSET strEncodedFile = ToBase64(strFiledata)> <CFSET strWordDoc =
ToString(strEncodedFile)> <!--- Tried ToBInary(strEncodedFile) as well --->
<CFFILE ACTION='WRITE' FILE='d:\temp\decode.doc' output='#strEncodedFile#'>
</body> </html> If anyone has experience with this or have any suggestions,
please let me know. Thank you.
BKS Guest
-
Parsing Base64 encoding
A web service returns base64 encoded data. The goal is to parse it and store it into binary file with .dat extension. This file is then will be used... -
Java Base64 encoding
When I specify a username and password within a CFHTTP tag does Cold Fusion automatically Java Base64 encode these values or is it something you... -
#26036 [Fbk->Csd]: base64 encoding is wrong
ID: 26036 Updated by: sniper@php.net Reported By: topitz at definiens dot com -Status: Feedback +Status: ... -
#26036 [NEW]: base64 encoding is wrong
From: topitz at definiens dot com Operating system: Win2k PHP version: 4.3.3 PHP Bug Type: Mail related Bug description: ... -
base64 encoding a replace string
I've got the example below to set up phpOpenTracker to log exit URL's but I'm having trouble getting it to work. I have played with the quotes and...



Reply With Quote

