PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Result of string conversion
  • UTF8 - ANSI conversion
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
Converts:
  • a character string in ANSI format (Windows) into a character string in UNICODE format.
  • a buffer containing a character string in ANSI format (Windows) into a buffer containing a character string in UNICODE format.
Reminder:
  • ANSI is the format of characters according to the Windows standard.
  • UNICODE is a mechanism for encoding characters. The UNICODE format is used to manage the different languages and the different character sets.
Versions 16 and later
Java This function is now available for the Java applications.
New in version 16
Java This function is now available for the Java applications.
Java This function is now available for the Java applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps 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
MyUnicodeBuffer is Buffer
// Convert MyAnsiBuffer
// that contains a character string in ANSI format
// into a buffer containing a character string
// in UNICODE format
MyUnicodeBuffer = AnsiToUnicode(MyAnsiBuffer)
WindowsLinuxUniversal Windows 10 AppUser code (UMC)
// Code to use in a non-Unicode project
MyUnicodeString is UNICODE string
MyUnicodeString = AnsiToUnicode("Developing is fantastic", charsetGreek)
Syntax
WindowsLinuxUniversal Windows 10 AppUser code (UMC)

Converting an ANSI character string Hide the details

<Result> = AnsiToUnicode(<Character String to Convert> [, <Charset>])
<Result>: UNICODE character string
  • Character string in UNICODE format.
  • EOT if a conversion problem occurred.
<Character String to Convert>: Character string
Character string in ANSI format 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).
charsetTraditionalChineseTraditional Chinese characters (Republic of Taiwan).
charsetKoreanKorean characters
charsetCurrent
(Default value)
Uses the current character set specified by ChangeCharset (charsetOccidental by default).
charsetDefaultUses the default character set defined for the computer. No character set is forced.
charsetEastEuropeCharacters of Eastern Europe (Polish, ...)
charsetGreekGreek characters.
charsetHebrewHebrew characters.
charsetJapaneseJapanese characters.
Versions 20 and later
charsetMac
New in version 20
charsetMac
charsetMac
Characters to the Mac Roman standard (used on the old Macintosh versions).
charsetRussianRussian characters.
charsetThaiThai characters.
charsetTurkishTurkish characters.
charsetUTF8Used to manage the UTF8 format (used in XML for example).
charsetVietnameseVietnamese characters.

Converting a buffer containing a character string in ANSI format Hide the details

<Result> = AnsiToUnicode(<Buffer> [, <Charset>])
<Result>: Buffer
  • Buffer containing a character string in UNICODE format.
  • EOT if a conversion problem occurred.
<Buffer>: Buffer
Buffer containing a character string in ANSI format to convert. If <Buffer> contains a character string in Unicode format, <Result> will contain an invalid string.
<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).
charsetTraditionalChineseTraditional Chinese characters (Republic of Taiwan).
charsetKoreanKorean characters.
charsetCurrent
(Default value)
Current character set specified by ChangeCharset (charsetOccidental by default).
charsetDefault
Uses the default character set defined for the computer. No character set is forced.
charsetEastEuropeEastern Europe characters (Polish, ...).
charsetGreekGreek characters.
charsetHebrewHebrew characters.
charsetJapaneseJapanese characters.
Versions 20 and later
charsetMac
New in version 20
charsetMac
charsetMac
Characters to the Mac Roman standard (used on the old Macintosh versions).
charsetOccidental
charsetRussianRussian characters.
charsetThaiThai characters.
charsetTurkishTurkish characters.
charsetUTF8Used to manage the UTF8 format (used in XML for example).
charsetVietnameseVietnamese characters.
Remarks
WindowsLinuxUniversal Windows 10 AppUser code (UMC)

Result of string conversion

The result of the conversion is a character string or a buffer in UNICODE format. This string (or this buffer) can only be handled by the variables and functions that support the UNICODE format.
If a confusion occurs between a string in UNICODE format and a string in ANSI format, the conversion will be implicitly performed.
See Managing the UNICODE format for more details.
WindowsLinuxUniversal Windows 10 AppUser code (UMC)Stored procedures

UTF8 - ANSI conversion

To convert an ANSI string into a string in UTF8 format, use StringToUTF8.
To convert a UFT8 string into a string in ANSI format, use:
Component : wd240vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment