F
Flash Gordon
jaysome wrote, On 04/03/07 09:44:
That is a problem with you not knowing (or deliberately not using) the
correct method to copy text files between systems. You can get
comparable results by copying a binary file where the encoding is
*exactly* specified by copying using the wrong method.
The C standard could not sensibly specify the source character set
because if it did you would find that either on your PC or on your IBM
mainframe you would not be able to use a standard text editor on your C
source files, and that would be just plain stupid.
So try again using one of the correct methods for copying text files,
such as FTP in "ASCII" mode which is explicitly defined for solving this
very problem.
Oh, and your argument would say that exactly NOTHING is portable
(including binary files between machines of the same type running the
same version of the same OS), so it is a completely useless way of
talking about portability.
I have this simple Standard C program:
#include <stdio.h>
int main(void)
{
printf("Hello world.\n");
return 0;
}
I copied the source code file from my IBM mainframe to my Windows box.
I compiled it using Microsoft VC++, but I got a lot of warnings:
hello.c(1) : error C2449: found '{' at file scope (missing function
header?)
When I look at the code on my monitor on my IBM mainframe it looks
like "portable" C. I suspect there is a character encoding issue and I
need to "migrate" the code from the IBM mainframe to my PC by using an
EBCDIC-to-ASCII translator, as I seem to recall that the encoding of
the character set is not specified by the C standard.
That is a problem with you not knowing (or deliberately not using) the
correct method to copy text files between systems. You can get
comparable results by copying a binary file where the encoding is
*exactly* specified by copying using the wrong method.
The C standard could not sensibly specify the source character set
because if it did you would find that either on your PC or on your IBM
mainframe you would not be able to use a standard text editor on your C
source files, and that would be just plain stupid.
So try again using one of the correct methods for copying text files,
such as FTP in "ASCII" mode which is explicitly defined for solving this
very problem.
Oh, and your argument would say that exactly NOTHING is portable
(including binary files between machines of the same type running the
same version of the same OS), so it is a completely useless way of
talking about portability.