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
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Converts a string or buffer to the specified format: UTF, Ansi, Unicode.
Note: This function supports UTF8, UTF16 Little Endian, UTF16 Big Endian and UTF32 formats.
Example
// Convert an ANSI string to a UTF-32 Little Endian buffer
MyAnsiString is ANSI string = "start"
MyBuffer is Buffer = UTFConvert(MyAnsiString, charsetCurrent, charsetUTF32LE)
Syntax
<Result> = UTFConvert(<String or buffer to convert> , <Source charset> , <Destination charset>)
<Result>: Character string or Buffer
Conversion result:
  • Unicode string if destination character set matches constant alphabetUnicode.
  • ANSI string or buffer otherwise.
  • Empty string ("") in case of conversion problem. 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>: Integer
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: wd300vm.dll
Minimum version required
  • Version 28
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 10/17/2024

Send a report | Local help