[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FTPAPI Code Page Question



Hi Francis,

I'm sorry, but I really don't understand what you're trying to do. You 
are copying a physical file to a source physical file.  Why would you do 
that?   Then you're copying that to a Windows Latin-1 (CCSID 1252) file. 
  Not sure why...

Then you say that SOMETHING -- you didn't say what -- reports the file 
as 'ANSI'.

Sorry, but I'm completely lost.

What encoding DO you want the file to be in?  UTF-8?  UCS-2? UTF-16? 
UTF-32?  (All of these are unicode)

When you create the original file (looks like it's called AROCH) is that 
created specifically for this purpose?  Or is that a file that's used by 
many processes on your system?   If it's created just for this purpose, 
why not create it in Unicode to begin with?  (RPG has natives support 
for the double-byte unicode types)

UTF-8 (Unicode) and ISO-8859-1 ("ANSI") are identical encodings unless 
you have some "special" characters.   Invariant characters like letters 
and numbers are IDENTICAL in UTF-8 and ANSI, and therefore it seems 
reasonable that a computer program can't tell the difference between 
them.   Perhaps you meant to use UTF-16 instead?


Francis Lapeyre wrote:
> I'm having a devil of a time here. Here is what I tried (as a test):
> 
> CPYF FROMFILE(ARQCCOM/AROCH) TOFILE(FMLLIB/AROCH) TOMBR(AROCH) 
> MBROPT(*REPLACE) FMTOPT(*CVTSRC) SRCOPT(*SEQNBR) SRCSEQ(.01 .01)
> 
> CPYTOSTMF FROMMBR('/qsys.lib/fmllib.lib/aroch.file/aroch.mbr') 
> TOSTMF('/flapeyre1/testoch.txt') STMFOPT(*REPLACE) STMFCODPAG(1252)
> 
> Then, I tried to manually transfer the file over to Windows, using
> the AS/400 FTP client. I transferred it as Binary. I opened it up in
> Notepad, did a File, Save as, and the Encoding is ANSI (where I 
> expected it to be Unicode).
> 
> Any other suggestions? I would rather not do any post-processing on 
> the files under Windows, if possible.
> , but that's my last resort.
> 
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------