Hi, all.
I am in need to download a file from an MVS mainframe via FTP, open it,
replace a few text characters, and put it back on the mainframe.
The issue is, the file contains non-ASCII characters.
The method I tried was to use CFFTP binary download option and convert it to
Base64 on my ColdFusion server (6.1MX).
I then converted the strings I want to search and replace on the file to
Base64, and did a find and replace on the converted file.
Needless to say, it did not work (could not find the strings to replace). Do ...

Manipulating files with non-ASCII characters

Hi, all.

I am in need to download a file from an MVS mainframe via FTP, open it,
replace a few text characters, and put it back on the mainframe.

The issue is, the file contains non-ASCII characters.

The method I tried was to use CFFTP binary download option and convert it to
Base64 on my ColdFusion server (6.1MX).
I then converted the strings I want to search and replace on the file to
Base64, and did a find and replace on the converted file.

Needless to say, it did not work (could not find the strings to replace). Do I
need to put the base64 converted file into an array, and then do the search and
replace on all rows? If so, how?

Re: Manipulating files with non-ASCII characters

Re: Manipulating files with non-ASCII characters

Re: Manipulating files with non-ASCII characters

Frustated wrote:

oh my. unfortunately there are literally dozens of EBCDIC flavors though
might not matter in your case depending on what you need to change. have
you just tried US-ASCII encoding (cht option) w/cffile & adjusting
for the different codepoints? if not, do you have an example i can look at?