PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Conversion in PHP
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 UTF-8 string to ANSI or UNICODE.
Versions 15 and later
Android This function is now available for Android applications.
Java This function is now available for Java applications.
New in version 15
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.
Java This function is now available for Java 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.
New in version 18
Android Widget This function is now available in Android widget mode.
Android Widget This function is now available in Android widget 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
// Convert a UTF-8 string to ANSI
ConversionResult = UTF8ToString(UTF8String, charsetAnsi)
Syntax
<Result> = UTF8ToString(<UTF-8 string to convert> [, <Destination charset>])
<Result>: Character string
  • In ANSI: ANSI character string.
    • If the destination character set is not specified, the string is converted to ANSI using the current character set.
    • If the destination character set is specified, the string is converted to ANSI using the specified character set.
  • In Unicode: UNICODE character string with the result of the conversion. The destination character set is ignored.
  • EOT if conversion problems occurred.
<UTF-8 string to convert>: Character string
String to convert.
WINDEVWEBDEV - Server code This string is an ANSI string in UTF-8 format.
iPhone/iPadIOS WidgetMac Catalyst This parameter corresponds to a buffer containing a UTF-8 string. The result will be an Unicode string with the result of the conversion.
<Destination charset>: Optional integer
Character set that will be used to create the string. By default, this parameter corresponds to the current character set (specified with ChangeCharset).
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.
AndroidAndroid Widget Java Only this value is available.
charsetEastEuropeEastern Europe characters (Polish, etc.)
charsetGreekGreek characters
charsetHebrewHebrew characters
charsetJapaneseJapanese characters
charsetKoreanKorean characters
charsetRussianRussian characters
charsetThaiThai characters
charsetTraditionalChineseTraditional Chinese characters (Republic of Taiwan)
charsetTurkishTurkish characters
charsetUTF8Used to manage UTF-8 (used in XML, for example).
charsetVietnameseVietnamese characters
Universal Windows 10 App This parameter is not available.
Remarks
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: wd270vm.dll
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment