hb_cdpSelect()

HB_CDPSELECT()

Select the active code page by language ID

Syntax

      HB_CDPSELECT( [<cNewLang>] ) --> cOldLang

Arguments

<cNewLang> The optional ID of the country language module. Possible values for <cNewLang> are below as defined in the Codepage library, sorted by language.

      Language              Codepage       <cNewLang>
      --------------------- -------------- ----------------------
      Bulgarian             866            BG866
      Bulgarian             ISO-8859-5     BGISO
      Bulgarian             MIK            BGMIK
      Bulgarian             Windows-1251   BGWIN
      Croatian              437            HR437
      Croatian              852            HR852
      Croatian              Windows-1250   HR1250
      Czech                 852            CS852
      Czech                 ISO-8859-2     CSISO
      Czech                 KAM            CSKAM
      Czech                 Windoes-1250   CSWIN
      English               437            EN
      French                850            FR
      German                850            DE
      German                ISO-8859-1     DEWIN
      Greek                 737            EL
      Greek                 Windows-1253   ELWIN
      Hungarian (ntxhu852)  852            HU852
      Hungarian (sixhu852)  852            HU852S
      Hungarian (ntxhu852)  ISO-8859-2     HUISO
      Hungarian (sixhu852)  ISO-8859-2     HUISOS
      Hungarian (ntxhu852)  Windows-1250   HUWIN
      Hungarian (sixhu852)  Windows-1250   HUWINS
      Italian               437            IT437
      Italian               850            IT850
      Italian               ISO-8859-1b    ITISB
      Italian               ISO-8859-1     ITISO
      Lithuanian            Windows-1257   LT
      Polish                852            PL852
      Polish                ISO-8859-2     PLISO
      Polish                Mazowia        PLMAZ
      Polish                Windows-1250   PLWIN
      Portuguese            850            PT850
      Portuguese            ISO-8859-1     PTISO
      Russian               866            RU866
      Russian               KOI-8          RUKOI8
      Russian               Windows-1251   RU1251
      Serbian               Windows-1251   SRWIN
      Slovak                852            SK852
      Slovak                ISO-8859-2     SKISO
      Slovak                Kamenicky      SKKAM
      Slovak                Windows-1250   SKWIN
      Slovenian             437            SL437
      Slovenian             852            SL852
      Slovenian             ISO-8859-2     SLISO
      Slovenian             Windows-1250   SLWIN
      Spanish               850            ES
      Spanish               ISO-8859-1     ESWIN
      Spanish Modern        ISO-8859-1     ESMWIN
      Swedish               850            SV850
      Swedish (Clipper)     437            SVCLIP
      Swedish               ISO-8859-1     SVWIN
      Turkish               857            TR857
      Turkish               Windows-1254   TRWIN
      Ukrainian             866            UA866
      Ukrainian             KOI-8U         UAKOI8
      Ukrainian             Windows-1251   UA1251

Returns

<cOldLang> The old language indentifier

Description

HB_CDPSELECT() set the active code page use by Harbour for sorting and comparing strings. The default code page use ASCII order (cLang == “EN”).

NOTE: You must REQUEST every code page module you intend to use. For example: to use the Russian RU866 code page you must add the following to your program: REQUEST HB_CODEPAGE_RU866

Examples

      REQUEST HB_CODEPAGE_HU852
      PROCEDURE Main()
         LOCAL cTxt := Chr( 71 ) + " > " + Chr( 144 ) + " is"
         ? hb_cdpSelect()                 // EN
         ? cTxt, Chr( 71 ) > Chr( 144 )   // G > É is .F.
         ? hb_cdpSelect( "HU852" )        // EN
         ? cTxt, Chr( 71 ) > Chr( 144 )   // G > É is .T.
         ? hb_cdpSelect( "EN" )           // HU852
         ? cTxt, Chr( 71 ) > Chr( 144 )   // G > É is .F.
         RETURN

Compliance

This function is a Harbour Extension.

Platforms

All

Files

Libraty are rtl, codepage

Seealso

HB_LANGNAME(), HB_LANGSELECT(), HB_TRANSLATE(), NATIONMSG(), REQUEST

3 responses to “hb_cdpSelect()

  1. Pingback: Harbour All Functions – H | Viva Clipper !

  2. Pingback: Harbour Language and Nation Functions | Viva Clipper !

  3. Pingback: Harbour RG Summary | Viva Clipper !

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.