PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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, ...). fSaveBuffer is used to extract this file from the buffer.
Windows Mobile The first bytes of the file are automatically analyzed: if the file is in Ansi or UTF8 format, it is automatically converted into Unicode.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 16 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This function is now available for the Windows Phone applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
WINDEVWEBDEV - Server codeReports and QueriesAndroidAndroid Widget JavaPHPAjaxUser code (UMC)
// Load the content of "C:\Temp\MyFile.txt" into
// the "EDT_Edit1" edit control
EDT_Edit1 = fLoadText("C:\Temp\MyFile.txt")
Windows Mobile
// Load the content of "\Temp\MyFile.txt" into
// the "EDT_Edit1" edit control
EDT_Edit1 = fLoadText("\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 find out the error details, use ErrorInfo.
<Name and Path of Text File>: Character string (with quotes)
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
WindowsLinux This parameter can be in Ansi or Unicode format.
New in version 15
WindowsLinux This parameter can be in Ansi or Unicode format.
WindowsLinux This parameter can be in Ansi or Unicode format.
Windows Mobile This path must be a full path or a UNC path. It cannot be a relative path.
Versions 16 and later
Universal Windows 10 App In Windows Phone, only the files found in the directory of the application can be handled.
New in version 16
Universal Windows 10 App In Windows Phone, only the files found in the directory of the application can be handled.
Universal Windows 10 App In Windows Phone, only the files found in the directory of the application can be handled.
Versions 17 and later
iPhone/iPad The path of this file can correspond to a full or relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
New in version 17
iPhone/iPad The path of this file can correspond to a full or relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
iPhone/iPad The path of this file can correspond to a full or relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
<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.
AndroidAndroid Widget JavaPHP This parameter is not supported. The returned format corresponds to the format supported by the current platform.
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.
AndroidAndroid Widget JavaPHP This parameter is not supported. The returned format corresponds to the format supported by the current platform.
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.
AndroidAndroid Widget JavaPHP This parameter is not supported. The returned format corresponds to the format supported by the current platform.
Remarks
WINDEVWEBDEV - Server codeReports and QueriesWindowsAjaxUser code (UMC)

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)
Components
WINDEVWEBDEV - Server codeReports and Queries wd230std.dll
Windows Mobile wp230std.dll
Java wd230java.jar
Linux wd230std.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Exemplo fLoadText
Exemplo fLoadText

//Procurar Arquivo
sFile is string
// Opens the file picker
sFile = fSelect("", "", "Select a file...", "All the files (*.*)" + TAB + "*.*", "*.*")
EDT_nome_arquivo=sFile
//
//Ler Arquivo Texto
EDT_texto=fLoadText(EDT_nome_arquivo)
//Gravar Texto
//
fSaveText(EDT_nome_arquivo,EDT_texto)
//Blog com video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/09/curso-windev-arquivos-018-arquivos_11.html
https://www.youtube.com/watch?v=LlFvXKc9dg4
De matos AMARILDO
Sep. 11 2016