PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | French EN
  • Result of string conversion
  • UTF-8 and ANSI conversion
  • Conversion in PHP
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:
  • an ANSI string (Windows) to a UNICODE string.
    Windows Mobile No character string can be converted in this version.
  • a buffer containing an ANSI string (Windows) to a buffer containing a UNICODE string.
Reminder:
  • ANSI is the character set used in Windows.
  • UNICODE is a mechanism for encoding characters. The UNICODE format is used to manage the different languages and character sets.
Versions 16 and later
Java This function is now available for Java applications.
Android This function is now available for Android applications.
New in version 16
Java This function is now available for Java applications.
Android This function is now available for Android applications.
Java This function is now available for Java applications.
Android This function is now available for Android applications.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
MyUnicodeBuffer is Buffer
// Convert MyAnsiBuffer
// that contains an ANSI string
// to a buffer containing a UNICODE string
MyUnicodeBuffer = AnsiToUnicode(MyAnsiBuffer)
Reports and QueriesWindowsLinuxUniversal Windows 10 AppPHPAjaxUser code (UMC)
// Code to use in a non-Unicode project
MyUnicodeString is UNICODE string
MyUnicodeString = AnsiToUnicode("Developing is fantastic", charsetGreek)
Syntax
Reports and QueriesWindowsLinuxAndroidAndroid Widget Universal Windows 10 AppPHPAjaxUser code (UMC)

Converting an ANSI character string Hide the details

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

Converting a buffer containing an ANSI string Hide the details

<Result> = AnsiToUnicode(<Buffer> [, <Charset>])
<Result>: Buffer
  • Buffer containing a UNICODE string.
  • EOT if a conversion problem occurred.
<Buffer>: Buffer
Buffer containing an ANSI string to convert. If <Buffer> contains a UNICODE string, <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 with ChangeCharset (charsetOccidental by default).
charsetDefault
Windows Mobile Default value
Uses the default character set defined on the computer. No character set is forced.
charsetEastEuropeEastern Europe characters (Polish, etc.).
charsetGreekGreek characters.
charsetHebrewHebrew characters.
charsetJapaneseJapanese characters.
Versions 20 and later
charsetMac
New in version 20
charsetMac
charsetMac
Mac Roman character set (used in previous versions of Macintosh).
charsetOccidental
Windows Mobile Roman characters in ANSI standard.
charsetRussianRussian characters.
charsetThaiThai characters.
charsetTurkishTurkish characters.
charsetUTF8Used to manage the UTF-8 format (used in XML, for example).
charsetVietnameseVietnamese characters.
Remarks
Reports and QueriesWindowsLinuxAndroidAndroid Widget Universal Windows 10 AppAjaxUser code (UMC)

Result of string conversion

The result of the conversion is a UNICODE string or buffer. This string (or buffer) can only be handled by variables and functions that support UNICODE.
In case of confusion between a UNICODE string and an ANSI string, the conversion will be implicitly performed.
See Managing UNICODE for more details.
Reports and QueriesWindowsLinuxAndroidAndroid Widget Universal Windows 10 AppAjaxUser code (UMC)Stored 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:
PHP

Conversion in PHP

The conversion in PHP uses the following extensions:
  • the php_iconv.dll extension
  • the php_mbstring.dll extension
If none of these PHP extensions are used, only Latin characters will be converted (e.g., Chinese or Russian characters will not be converted).
The php_iconv.dll and php_mbstring.dll extensions are currently proposed on PHP servers. To find out if your hosting provider offers these extensions, simply enter the following information in a search engine: phpinfo <Hosting provider>.
To install these extensions on your own PHP server, simply uncomment the desired extension in the PHP.INI file.
Component : wd260vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment