ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE


Asc
Val
New WINDEV, WEBDEV and WINDEV Mobile 28 feature!
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.
Example
// Convert an ANSI string to a UTF-32 buffer
MyAnsiString is ANSI string = "start"
MyBuffer is Buffer = UTFConvert(MyAnsiString, charsetCurrent, charsetUTF32)
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.
charsetUTF32UTF-32 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.
charsetUTF32UTF-32 character set.
charsetUTF8UTF-8 character set (used in XML, for example).
Minimum version required
  • Version 28
This page is also available for…
Comments
Click [Add] to post a comment