.. highlight:: us .. _text_file_read: text_file_read ============== .. index:: text_file_read .. us.tag text_file_read New500 ffiles unicode :ref:`text_file_read` reads unicode and ANSI text files. .. function:: ssText = text_file_read(ssFilename) svTextAndType = text_file_read(ssFilename, bTypeInfo) .. us.return **Return Value** If the function is called with a parameter, *ssText* contains the read text. If the function is called with the parameter *bTypeInfo* equal to 1, the function returns a string vector with 3 elements. *svTextAndType* contains the text read in *svTextAndType[1]*. .. us.params **Parameters** .. uparam:: ssFilename *ssFilename* is the complete name of the text file. .. uparam:: bTypeInfo If set to 1, the output of *text_file_read* becomes a vector with the information shown in the table below. .. list-table:: :header-rows: 1 * - Value - Description * - svTextAndType[1] - Is the read text or an empty string if an error has occurred. * - svTextAndType[2] - Is the encoding of the text file (see :ref:`text_file_write`). * - svTextAndType[3] - Is the type of line separation (see :ref:`text_file_write`). .. us.example **Example** :: ]] [[ .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.0.0 - New .. seealso:: :ref:`overview-binary-and-text-files`, :ref:`fgetline` :ref:`text_file_write`, :sub:`id-1987336`