|
|
|
|
|
- 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
ChangeCharset (Function) In french: ChangeAlphabet 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. Remark: 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.
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:
| | charsetAnsi | Roman characters in ANSI standard | charsetArabic | Arabic characters | charsetBaltic | Baltic characters | charsetChinese | Chinese characters (People's Republic of China) | charsetDefault | Uses the computer's default character set. No character set is forced. | charsetEastEurope | Eastern European characters (Polish, etc.) | charsetGreek | Greek characters | charsetHebrew | Hebrew characters | charsetJapanese | Japanese characters | charsetKorean | Korean characters | charsetMac | Mac Roman character set (used in previous versions of Macintosh). | charsetOccidental | Roman characters in ANSI standard | charsetRussian | Russian characters | charsetThai | Thai characters | charsetTraditionalChinese | Traditional Chinese characters (Republic of Taiwan) | charsetTurkish | Turkish characters | charsetUTF8 | Used to manage the countries with two character sets (Hong Kong) and the countries with no character set defined in Windows (Georgian and Armenian). | charsetVietnamese | Vietnamese characters |
<Language>: Optional Integer constant New language to use. For more details on these constants, see Correspondence between languages, sub-languages, character sets and nations. 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. For more details on sub-languages, see Correspondence between languages, sub-languages, character sets and nations. 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. <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.
| | | | Language | Sort mode | Constant | Value | Sort | Value | languageGerman | 7 | Standard | 0 | Directory | 1 | languageChinese | 4 | Phonetic | 0 | Unicode | 1 | Stroke count order | 2 | | Bopomofo standard | 3 | languageKorean | 18 | KSC | 0 | Unicode | 1 | languageGeorgian | 55 | Standard | 0 | Modern | 1 | languageHungarian | 14 | Standard | 0 | Technical | 1 | languageJapanese | 17 | XJIS | 0 | Unicode | 1 |
Retrieving the character set currently used Hide the details
<Result> = ChangeCharset()
<Result>: Integer constant Constant identifying the character set currently used. | | charsetAnsi | Roman characters in ANSI standard | charsetArabic | Arabic characters | charsetBaltic | Baltic characters | charsetChinese | Chinese characters (People's Republic of China) | charsetDefault | Uses the computer's default character set. No character set is forced. | charsetEastEurope | Eastern European characters (Polish, etc.) | charsetGreek | Greek characters | charsetHebrew | Hebrew characters | charsetJapanese | Japanese characters | charsetKorean | Korean characters | charsetMac | Mac Roman character set (used in previous versions of Macintosh). | charsetOccidental | Roman characters in ANSI standard | charsetRussian | Russian characters | charsetThai | Thai characters | charsetTraditionalChinese | Traditional Chinese characters (Republic of Taiwan) | charsetTurkish | Turkish characters | charsetUTF8 | Used to manage the countries with two character sets (Hong Kong) and the countries with no character set defined in Windows (Georgian and Armenian). |
Remarks How to use a specific character set? To use a specific character set, you must: - Install the files that correspond to the desired character sets in the regional settings of Windows (control panel).
- 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 desired 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. 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 will not take into account "double-letters" (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.
Changing the character set control by control You can also change the character set used control by control with the FontCharset property. 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. It is recommended to use UnicodeToAnsi before performing specific operations on character strings.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|