|
- 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 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) | charsetTraditionalChinese | Traditional Chinese characters (Republic of Taiwan) | charsetKorean | Korean characters | charsetDefault | Uses the default character set defined on the computer. No character set is forced. | charsetEastEurope | Eastern Europe characters (Polish, etc.) | charsetGreek | Greek characters | charsetHebrew | Hebrew characters | charsetJapanese | Japanese characters | Versions 20 and latercharsetMac New in version 20charsetMac charsetMac | Mac Roman character set (used in previous versions of Macintosh). | charsetOccidental | Roman characters in ANSI standard | 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). | charsetRussian | Russian characters | charsetThai | Thai characters | charsetTurkish | Turkish characters | 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. 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 New in version 17 <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 |
Versions 17 and later New in version 17
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) | charsetTraditionalChinese | Traditional Chinese characters (Republic of Taiwan) | charsetKorean | Korean characters | charsetDefault | Uses the default character set defined on the computer. No character set is forced. | charsetEastEurope | Characters of Eastern Europe (Polish, ...) | charsetGreek | Greek characters | charsetHebrew | Hebrew characters | charsetJapanese | Japanese characters | Versions 20 and latercharsetMac New in version 20charsetMac charsetMac | Mac Roman character set (used in previous versions of Macintosh). | charsetOccidental | Roman characters in ANSI standard | 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). | charsetRussian | Russian characters | charsetThai | Thai characters | charsetTurkish | Turkish characters |
Remarks How to use a specific character set? To use a specific character set, you must: - Install the files corresponding to the requested 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 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. 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.
Changing the character set control by control It is also possible to change the alphabet used field by field with the Property ..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.
This page is also available for…
|
|
|
| |
| Click [Add] to post a comment |
|
| |
|
| |
| |
| |
| |
| |
| |
| | |
| |