ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / String functions
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
Converts a string or buffer to the specified format: UTF, ANSI, Unicode.
Remark: This function supports UTF-8, UTF-16 Little Endian, UTF-16 Big Endian and UTF-32.
New in version 2024
Java This function is now available for Java applications from version 2024 Update 1.
Example
// Conversion chaîne ANSI en un buffer UTF32 Little Endian
MaChaîneAnsi is string ANSI = "début"
MonBuffer is Buffer = UTFConvert(MaChaîneAnsi, charsetCurrent, charsetUTF32LE)
Syntax
<Result> = UTFConvert(<String or buffer to convert> , <Source charset> , <Destination charset>)
<Result>: Character string or Buffer
Conversion result:
  • UNICODE string if the destination character set corresponds to charsetUnicode.
  • ANSI string or buffer otherwise.
  • Empty string ("") if there is a conversion error. The ErrorOccurred variable is set to True and the corresponding error message is returned by ErrorInfo.
<String or buffer to convert>: Character string or Buffer
String or buffer to convert.
<Source charset>: Integer constant
Character set of the string or buffer to convert:
charsetCurrentCurrent character set specified with ChangeCharset (charsetOccidental by default).
charsetUnicodeUNICODE character set.
charsetUTF16BEUTF-16 Big Endian character set.
charsetUTF16LEUTF-16 Little Endian character set.
charsetUTF32BEUTF-32 Big Endian character set.
charsetUTF32LEUTF-32 Little Endian character set.
charsetUTF8UTF-8 character set (used in XML, for example).
<Destination charset>: entier
Character set that will be used to create the resulting string or buffer:
charsetCurrentCurrent character set specified with ChangeCharset (charsetOccidental by default).
charsetUnicodeUNICODE character set.
charsetUTF16BEUTF-16 Big Endian character set.
charsetUTF16LEUTF-16 Little Endian character set.
charsetUTF32BEUTF-32 Big Endian character set.
charsetUTF32LEUTF-32 Little Endian character set.
charsetUTF8UTF-8 character set (used in XML, for example).
Component: wd290vm.dll
Minimum version required
  • Version 28
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 02/02/2024

Send a report | Local help