PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Viewing the content of a file in UNICODE format
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Loads the content of a text file into any text control or text variable (string variable, edit control in a window, Static control in a report, etc.). fSaveBuffer is used to extract this file from the buffer.
Example
Reports and Queries
// Load the content of "C:\Temp\MyFile.txt" into
// the "EDT_Edit1" edit control
EDT_Edit1 = fLoadText("C:\Temp\MyFile.txt")
Syntax
<Result> = fLoadText(<Name and path of text file> [, <Load mode>])
<Result>: Character string
  • Content of text file,
  • Empty string ("") if an error occurred. To get the details of the error, use ErrorInfo.
<Name and path of text file>: Character string
Name and full (or relative) path of the text file. A UNC path can be used. This file is not necessarily a file in TXT format: indeed, the binary zeros are allowed.
Versions 15 and later
Windows This parameter can be in Ansi or Unicode format.
New in version 15
Windows This parameter can be in Ansi or Unicode format.
Windows This parameter can be in Ansi or Unicode format.
<Load mode>: Integer constant
Versions 17 and later
Load mode of the file:
foAnsiAnsi file. In this case, <Result> will correspond to an Ansi character string.
foUnicodeUnicode file. In this case, <Result> will correspond to an Unicode character string.

New in version 17
Load mode of the file:
foAnsiAnsi file. In this case, <Result> will correspond to an Ansi character string.
foUnicodeUnicode file. In this case, <Result> will correspond to an Unicode character string.

Load mode of the file:
foAnsiAnsi file. In this case, <Result> will correspond to an Ansi character string.
foUnicodeUnicode file. In this case, <Result> will correspond to an Unicode character string.

Remarks
Reports and QueriesWindows

Viewing the content of a file in UNICODE format

To view the content of a file in UNICODE format, you must perform the following process:
// Load the content of "C:\MyFiles\MyFile.XML" into MyString
MyBuffer is Buffer
MyBuffer = fLoadText("C:\MyFiles\MyFile.XML")
MyString is UNICODE string
MyString = MyBuffer
Info(MyString)
Component: wd270std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment