Search

 

Module: Editor

Version: 2.2.1 +

Type: String

Category: Text

 

Description

The formula "ReadFileWithEncoding' returns the contents of a text file with a certain encoding, as a text string. The encoding serves as a the parameter of the function. This formula is used for instance when there are special characters in the file you want to read. If you don't need the encoding, you could also use the formula 'ReadFile'.

Parameters

FileName:

Here you fill in the full path to the file

Encoding:

Here you fill in the encoding you want to use

Example

Description

Suppose you want to read the following data:



	Léa Mattéo

The name Léa Mattéo contains an accent symbol that makes the encoding necessary. When the formula 'ReadFile' is used for this data, the accent symbol will not be recognized.Therefore the formula 'ReadFileWithEncoding' has to be used.

Values parameters

FileName:

Fill in the entire path of the xml file

Encoding:

ISO-8859-1

You can find a complete list of all the possible encodings in this MSDN article on encodings.

Result

Result:


	Léa Mattéo

To see why encoding is necessary now, try reading the file with the 'ReadFile' formula, and compare the results.

Related Topics

- ReadFile

- GetPathToDataFiles

Updated: 2013-06-19