PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • How to use a specific character set?
  • Changing the character set used by the fonts
  • Changing the character set used by the operations performed on the character strings
  • Changing the character set control by control
  • Using the charsetUTF8 constant
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
Retrieves and/or changes the character set used:
  • by all the screen fonts.
  • by all the operations performed on the character strings (functions and/or operators).
This function allows you to manage all the languages that use specific character sets. The change of character set will be taken into account during the next opening of a window or page. We advise you to close and to re-open all the windows or pages.
Note: The different fonts are available in different character sets. For example, the "Arial" font exists in the western character set as well as in the Greek or Hebrew character set.
Versions 17 and later
Android This function is now available for the Android applications.
Java This function is now available for the Java applications.
New in version 17
Android This function is now available for the Android applications.
Java This function is now available for the Java applications.
Android This function is now available for the Android applications.
Java This function is now available for the Java 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.
iPhone/iPad This function is now available for the iPhone/iPad applications.
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.
iPhone/iPad This function is now available for the iPhone/iPad applications.
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.
iPhone/iPad This function is now available for the iPhone/iPad applications.
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.
WINDEVReports and QueriesAndroidAndroid Widget iPhone/iPadApple WatchWindows MobileUniversal Windows 10 AppJavaUser code (UMC)
// Change the display language of application to Chinese
// Sub-language : Macau (5)
// Sort mode: bopomofo standard (3)
Nation(nationChinese)
// Modify the character set
ChangeCharset(charsetChinese, languageChinese, 5, 3)
// Redisplay the "WIN_Window1" window
Use(WIN_Window1)
WEBDEV - Server codeAjax
// Change the display language of application to Chinese
// Sub-language : Macau (5)
// Sort mode: bopomofo standard (3)
Nation(nationChinese)
// Modify the character set
ChangeCharset(charsetChinese, languageChinese, 5, 3)
// Redisplay the "PAGE_Page1" page
PageUse(PAGE_Page1)
Syntax

Modifying the character set to use Hide the details

<Result> = ChangeCharset(<New Charset> [, <Language> [, <Sub-language> [, <Sort Mode>]]])
<Result>: Integer constant
Constant identifying the character set used before the modification.
<New Charset>: Integer constant
Constant corresponding to the new character set to use:
charsetAnsiRoman characters in ANSI standard
charsetArabicArabic characters
charsetBalticBaltic characters
charsetChineseChinese characters (People's Republic of China)
charsetTraditionalChineseTraditional Chinese characters (Republic of Taiwan)
charsetKoreanKorean characters
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).
charsetOccidentalRoman characters in ANSI standard
charsetUTF8Used to manage the countries with two character sets (Hong Kong) and the countries with no character set defined in Windows (Georgian and Armenian).
charsetRussianRussian characters
charsetThaiThai characters
charsetTurkishTurkish characters
charsetVietnameseVietnamese characters
<Language>: Optional Integer constant
New language to use. See Correspondence between languages, sub-languages, character sets and nations for more details.
This language must correspond to the specified <New Charset>. Otherwise, a WLanguage error will occur.
This parameter is used to manage the specific features of each country.
<Sub-language>: Optional integer
New sub-language to use. See Correspondence between languages, sub-languages, character sets and nations for more details.
This sub-language must correspond to the specified <New Charset>. Otherwise, a WLanguage error will occur.
This parameter is used to manage the specific features of each country.
Versions 17 and later
AndroidAndroid Widget Java This parameter is ignored.
New in version 17
AndroidAndroid Widget Java This parameter is ignored.
AndroidAndroid Widget Java This parameter is ignored.
<Sort Mode>: Optional integer
New sort mode to use. Only the following sort modes are available. This parameter is not available for the other languages.
LanguageSort mode
ConstantValueSortValue
languageGerman7Standard0
Directory1
languageChinese4Phonetic0
Unicode1
Stroke count order2
Bopomofo standard3
languageKorean18KSC0
Unicode1
languageGeorgian55Standard0
Modern1
languageHungarian14Standard0
Technical1
languageJapanese17XJIS0
Unicode1
Versions 17 and later
AndroidAndroid Widget Java This parameter is ignored.
New in version 17
AndroidAndroid Widget Java This parameter is ignored.
AndroidAndroid Widget Java This parameter is ignored.

Retrieving the character set currently used Hide the details

<Result> = ChangeCharset()
<Result>: Integer constant
Constant identifying the character set currently used.
charsetAnsiRoman characters in ANSI standard
charsetArabicArabic characters
charsetBalticBaltic characters
charsetChineseChinese characters (People's Republic of China)
charsetTraditionalChineseTraditional Chinese characters (Republic of Taiwan)
charsetKoreanKorean characters
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).
charsetOccidentalRoman characters in ANSI standard
charsetUTF8Used to manage the countries with two character sets (Hong Kong) and the countries with no character set defined in Windows (Georgian and Armenian).
charsetRussianRussian characters
charsetThaiThai characters
charsetTurkishTurkish characters
Remarks

How to use a specific character set?

To use a specific character set, you must:
  1. Install the files corresponding to the requested character sets in the regional settings of Windows (control panel).
  2. Use ChangeCharset in your program.

Changing the character set used by the fonts

ChangeCharset modifies the character set used by all fonts. The fonts that use the requested character set must be installed on the current computer.
ChangeCharset takes effect immediately. We advise you to close and re-open all the windows or pages.
WINDEVWINDEV Mobile To apply this change to the current window, we recommend that you use Use to force the re-opening of current window.
WEBDEV - Server code To apply this change to the current page, we recommend that you use PageUse or FramesetUse to redisplay the current page.

Changing the character set used by the operations performed on the character strings

ChangeCharset modifies the character set used by the operations performed on the character strings. This new character set will be taken into account:
  • when comparing two strings according to the lexicographical order (StringCompare associated with the ccLexicographicOrder constant). This comparison does not take the "double letters" into account (CH in Spanish or LJ in Croatian for example).
  • in the HFSQL indexes (Classic mode or Client/Server mode) once the indexes have been built or rebuilt (HCreation, HCreationIfNotFound or HIndex associated with the hChangeCharset constant). The sort order in the indexes does not take the "double letters" into account (CH in Spanish or LJ in Croatian for example).
ChangeCharset takes effect immediately. We advise you to close and re-open all the windows or pages.
WINDEVWINDEV Mobile To apply this change to the current window, we recommend that you use Use to force the re-opening of current window.
WEBDEV - Server code To apply this change to the current page, we recommend that you use PageUse or FramesetUse to redisplay the current page.

Changing the character set control by control

You also have the ability to modify the character set used control by control with ..FontCharset.

Using the charsetUTF8 constant

The charsetUTF8 constant is used to manage the countries with two character sets (Hong Kong) and the countries with no character set defined in Windows.
In this mode, if a Latin character set is used, the accented characters are not coded on one byte but on several bytes. A character can be coded on 4 bytes.
This operating mode triggers specific effects when managing the character strings.
For example, Length does no longer return the number of characters but the number of bytes corresponding to the string. We recommend that you use UnicodeToAnsi before performing specific operations on the character strings.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
Java wd230java.jar
Linux wd230vm.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment