Check the remote webpage to see if its ASCII or binary
1 answer
Not sure about the meaning (or really the intent) of the question, but it is entirely possible to send an HTTP GET request to a web page and check what is returned. If all bytes are in the range 0x20 to 0x7e, you can safely assume it is ASCII. Anything outside this range is not ASCII.
Perhaps if your question pointed more to why you were trying to do this, we could help you further.
If you want to find out if the FTP page on the server was in ASCII or binary mode, it won't make any difference (and you won't be able to tell) if the server and machine that uploaded it as ASCII.
If you have uploaded, for example, an EBCDIC file in binary mode to an ASCII server, it will be immediately obvious :-).
+1
source to share