The GetText method is used to download the contents of a text file
and store it in a String variable. This method should only be
used with text files which are known to be textual.
For example, it is safe to use this method when downloading an HTML or
XML document, but should not be used to download executable or
compressed files (such as Microsoft Word documents or Excel
spreadsheets) . Always use the GetData method if you wish to
retrieve binary data and store it in a byte array.
The text document returned by the server is automatically converted to
Unicode using the code page specified by the CodePage property.
Most text files today will use either ASCII or UTF-8 encoding,
however some documents may contain text specific to the locale they
were created in. Because ASCII is a subset of UTF-8, it is safe to
specify UTF-8 encoding for ASCII text documents.
If you specify an incorrect code page, this can
result in a conversion error.
This method will always attempt to normalize the end-of-line character
sequence to use a carriage-return and linefeed (CRLF) pair. This can
potentially result in a discrepancy between the size of a text file on
the server and the actual length of the string buffer.
This method will always use an ASCII file transfer mode, regardless
of the value of the FileType property. If the remote file
contains binary data, the string buffer may be empty or contain unprintable
characters as the result of attempting to convert the data to Unicode.