ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / String functions
  • Conversion result
  • UTF-8 and ANSI conversion
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 an ANSI string (Windows) to a UNICODE string.
Reminder:
  • ANSI is the character set used in Windows.
  • UNICODE is a character encoding standard. UNICODE is used to manage different languages and character sets.
Example
// Code to use in a non-Unicode project
MyUnicodeString is UNICODE string
MyAnsiString is ANSI string
MyAnsiString = "Developing is fantastic"
MyUnicodeString = MyAnsiString.AnsiToUnicode(charsetGreek)
Syntax

Converting an ANSI character string Hide the details

<Result> = <String to convert>.AnsiToUnicode([<Charset>])
<Result>: UNICODE character string
  • String in UNICODE format.
  • EOT if a conversion problem occurred.
<String to convert>: Character string
ANSI string to convert.
<Charset>: Optional Integer constant
Character set that will be used for the conversion.
charsetAnsiRoman characters in ANSI standard.
charsetArabicArabic characters.
charsetBalticBaltic characters.
charsetChineseChinese characters (People's Republic of China).
charsetCurrent
(Default value)
Uses the current character set specified with ChangeCharset (charsetOccidental by default).
charsetDefaultUses the computer's default character set. No character set is forced.
charsetEastEuropeEastern European characters (Polish, etc.)
charsetGreekGreek characters.
charsetHebrewHebrew characters.
charsetJapaneseJapanese characters.
charsetKoreanKorean characters
charsetMacMac Roman character set (used in previous versions of Macintosh).
charsetRussianRussian characters.
charsetThaiThai characters.
charsetTraditionalChineseTraditional Chinese characters (Republic of Taiwan).
charsetTurkishTurkish characters.
charsetUTF8Used to manage UTF-8 (used in XML, for example).
charsetVietnameseVietnamese characters.
Remarks

Conversion result

The result of the conversion is a UNICODE string.. This string can only be handled by variables and functions that support UNICODE.
If you use the wrong format, the conversion will be implicitly performed.
For more details on Unicode, see Managing UNICODE.
Reports and QueriesWindowsStored procedures

UTF-8 and ANSI conversion

To convert an ANSI string to UTF-8, use StringToUTF8.
To convert a UFT-8 string to ANSI, use:
Component: wd290vm.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/21/2023

Send a report | Local help