how to identify which HB_CODEPAGE was REQUEST

how to identify which HB_CODEPAGE was REQUEST

Postby Jimmy » Sun Nov 27, 2022 6:55 am

hi,

to use a Codepage i must REQUEST it before.
but how do i "identify" if a Codepage was REQUEST so i can "use" it :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: how to identify which HB_CODEPAGE was REQUEST

Postby Antonio Linares » Sun Nov 27, 2022 9:15 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: how to identify which HB_CODEPAGE was REQUEST

Postby Jimmy » Sun Nov 27, 2022 10:00 am

hi Antonio,

i have follow links and made this Sample where i REQUEST DExxx Codepage
Code: Select all  Expand view  RUN
#include "fivewin.ch"
#include "hbextcdp.ch"

//  REQUEST HB_LANG_ES
//  REQUEST HB_LANG_EN
//  REQUEST HB_LANG_FR
//  REQUEST HB_LANG_PT
REQUEST HB_LANG_DEWIN
//  REQUEST HB_LANG_RUWIN
//  REQUEST HB_LANG_IT
//  REQUEST HB_LANG_PLWIN
//  REQUEST HB_LANG_EU
//  REQUEST HB_LANG_HR852
//  REQUEST HB_LANG_SLWIN
//  REQUEST HB_LANG_CSWIN

//  REQUEST HB_CODEPAGE_BG866
//  REQUEST HB_CODEPAGE_BGISO
//  REQUEST HB_CODEPAGE_BGMIK
//  REQUEST HB_CODEPAGE_BGWIN
//  REQUEST HB_CODEPAGE_CS852
//  REQUEST HB_CODEPAGE_CS852C
//  REQUEST HB_CODEPAGE_CSISO
//  REQUEST HB_CODEPAGE_CSKAMC
//  REQUEST HB_CODEPAGE_CSWIN
REQUEST HB_CODEPAGE_DE850
REQUEST HB_CODEPAGE_DE850M
REQUEST HB_CODEPAGE_DEISO
REQUEST HB_CODEPAGE_DEWIN
//  REQUEST HB_CODEPAGE_DK865
//  REQUEST HB_CODEPAGE_EL437
//  REQUEST HB_CODEPAGE_EL737
//  REQUEST HB_CODEPAGE_ELISO
//  REQUEST HB_CODEPAGE_ELWIN
//  REQUEST HB_CODEPAGE_EN
//  REQUEST HB_CODEPAGE_ES850
//  REQUEST HB_CODEPAGE_ES850C
//  REQUEST HB_CODEPAGE_ES850M
//  REQUEST HB_CODEPAGE_ESISO
//  REQUEST HB_CODEPAGE_ESMWIN
//  REQUEST HB_CODEPAGE_ESWIN
//  REQUEST HB_CODEPAGE_FI850
//  REQUEST HB_CODEPAGE_FR850
//  REQUEST HB_CODEPAGE_FR850C
//  REQUEST HB_CODEPAGE_FR850M
//  REQUEST HB_CODEPAGE_FRISO
//  REQUEST HB_CODEPAGE_FRWIN
//  REQUEST HB_CODEPAGE_HE862
//  REQUEST HB_CODEPAGE_HEWIN
//  REQUEST HB_CODEPAGE_HR646
//  REQUEST HB_CODEPAGE_HR852
//  REQUEST HB_CODEPAGE_HRISO
//  REQUEST HB_CODEPAGE_HRWIN
//  REQUEST HB_CODEPAGE_HU852
//  REQUEST HB_CODEPAGE_HU852C
//  REQUEST HB_CODEPAGE_HUISO
//  REQUEST HB_CODEPAGE_HUWIN
//  REQUEST HB_CODEPAGE_IS850
//  REQUEST HB_CODEPAGE_IS861
//  REQUEST HB_CODEPAGE_IT437
//  REQUEST HB_CODEPAGE_IT850
//  REQUEST HB_CODEPAGE_IT850M
//  REQUEST HB_CODEPAGE_ITISB
//  REQUEST HB_CODEPAGE_ITISO
//  REQUEST HB_CODEPAGE_ITWIN
//  REQUEST HB_CODEPAGE_LT775
//  REQUEST HB_CODEPAGE_LTWIN
//  REQUEST HB_CODEPAGE_NL850
//  REQUEST HB_CODEPAGE_NL850M
//  REQUEST HB_CODEPAGE_NO865
//  REQUEST HB_CODEPAGE_PL852
//  REQUEST HB_CODEPAGE_PLISO
//  REQUEST HB_CODEPAGE_PLMAZ
//  REQUEST HB_CODEPAGE_PLWIN
//  REQUEST HB_CODEPAGE_PT850
//  REQUEST HB_CODEPAGE_PT860
//  REQUEST HB_CODEPAGE_PTISO
//  REQUEST HB_CODEPAGE_RO852
//  REQUEST HB_CODEPAGE_ROISO
//  REQUEST HB_CODEPAGE_ROWIN
//  REQUEST HB_CODEPAGE_RU1251
//  REQUEST HB_CODEPAGE_RU866
//  REQUEST HB_CODEPAGE_RUISO
//  REQUEST HB_CODEPAGE_RUKOI8
//  REQUEST HB_CODEPAGE_SK852
//  REQUEST HB_CODEPAGE_SK852C
//  REQUEST HB_CODEPAGE_SKISO
//  REQUEST HB_CODEPAGE_SKKAMC
//  REQUEST HB_CODEPAGE_SKWIN
//  REQUEST HB_CODEPAGE_SL646
//  REQUEST HB_CODEPAGE_SL852
//  REQUEST HB_CODEPAGE_SLISO
//  REQUEST HB_CODEPAGE_SLWIN
//  REQUEST HB_CODEPAGE_SR646
//  REQUEST HB_CODEPAGE_SR646C
//  REQUEST HB_CODEPAGE_SRWIN
//  REQUEST HB_CODEPAGE_SV437C
//  REQUEST HB_CODEPAGE_SV850
//  REQUEST HB_CODEPAGE_SV850M
//  REQUEST HB_CODEPAGE_SVISO
//  REQUEST HB_CODEPAGE_SVWIN
//  REQUEST HB_CODEPAGE_TR857
//  REQUEST HB_CODEPAGE_TRISO
//  REQUEST HB_CODEPAGE_TRWIN
//  REQUEST HB_CODEPAGE_UA1125
//  REQUEST HB_CODEPAGE_UA1251
//  REQUEST HB_CODEPAGE_UA866
//  REQUEST HB_CODEPAGE_UAKOI8
//  REQUEST HB_CODEPAGE_UTF16LE
//  REQUEST HB_CODEPAGE_UTF8
//  REQUEST HB_CODEPAGE_UTF8EX

PROCEDURE Main()
   LOCAL cdp, x, i, aCDP

   FOR EACH cdp IN get_list_of_real_codepages()
      x := hb_cdpUniID( cdp )
      fwlog x, HB_CDPEXISTS(x)
   NEXT

   fwlog "********************************************************"

   aCDP := AllCodepage()
   FOR i := 1 TO LEN(aCDP)
      fwlog aCDP[i], HB_CDPEXISTS(aCDP[i])
   NEXT

RETURN

FUNCTION get_list_of_real_codepages()
   LOCAL s_uni := { => }
   LOCAL cdp
   s_uni := { => }
   FOR EACH cdp IN hb_cdpList()
      s_uni[ hb_cdpUniID( cdp ) ] := cdp
   NEXT
RETURN s_uni

FUNCTION AllCodepage()
LOCAL aRet := {}
AADD(aRet,"BG866")
AADD(aRet,"BGISO")
AADD(aRet,"BGMIK")
AADD(aRet,"BGWIN")
AADD(aRet,"CS852")
AADD(aRet,"CS852C")
AADD(aRet,"CSISO")
AADD(aRet,"CSKAMC")
AADD(aRet,"CSWIN")
AADD(aRet,"DE850")
AADD(aRet,"DE850M")
AADD(aRet,"DEISO")
AADD(aRet,"DEWIN")
AADD(aRet,"DK865")
AADD(aRet,"EL437")
AADD(aRet,"EL737")
AADD(aRet,"ELISO")
AADD(aRet,"ELWIN")
AADD(aRet,"EN")
AADD(aRet,"ES850")
AADD(aRet,"ES850C")
AADD(aRet,"ES850M")
AADD(aRet,"ESISO")
AADD(aRet,"ESMWIN")
AADD(aRet,"ESWIN")
AADD(aRet,"FI850")
AADD(aRet,"FR850")
AADD(aRet,"FR850C")
AADD(aRet,"FR850M")
AADD(aRet,"FRISO")
AADD(aRet,"FRWIN")
AADD(aRet,"HE862")
AADD(aRet,"HEWIN")
AADD(aRet,"HR646")
AADD(aRet,"HR852")
AADD(aRet,"HRISO")
AADD(aRet,"HRWIN")
AADD(aRet,"HU852")
AADD(aRet,"HU852C")
AADD(aRet,"HUISO")
AADD(aRet,"HUWIN")
AADD(aRet,"IS850")
AADD(aRet,"IS861")
AADD(aRet,"IT437")
AADD(aRet,"IT850")
AADD(aRet,"IT850M")
AADD(aRet,"ITISB")
AADD(aRet,"ITISO")
AADD(aRet,"ITWIN")
AADD(aRet,"LT775")
AADD(aRet,"LTWIN")
AADD(aRet,"NL850")
AADD(aRet,"NL850M")
AADD(aRet,"NO865")
AADD(aRet,"PL852")
AADD(aRet,"PLISO")
AADD(aRet,"PLMAZ")
AADD(aRet,"PLWIN")
AADD(aRet,"PT850")
AADD(aRet,"PT860")
AADD(aRet,"PTISO")
AADD(aRet,"RO852")
AADD(aRet,"ROISO")
AADD(aRet,"ROWIN")
AADD(aRet,"RU1251")
AADD(aRet,"RU866")
AADD(aRet,"RUISO")
AADD(aRet,"RUKOI8")
AADD(aRet,"SK852")
AADD(aRet,"SK852C")
AADD(aRet,"SKISO")
AADD(aRet,"SKKAMC")
AADD(aRet,"SKWIN")
AADD(aRet,"SL646")
AADD(aRet,"SL852")
AADD(aRet,"SLISO")
AADD(aRet,"SLWIN")
AADD(aRet,"SR646")
AADD(aRet,"SR646C")
AADD(aRet,"SRWIN")
AADD(aRet,"SV437C")
AADD(aRet,"SV850")
AADD(aRet,"SV850M")
AADD(aRet,"SVISO")
AADD(aRet,"SVWIN")
AADD(aRet,"TR857")
AADD(aRet,"TRISO")
AADD(aRet,"TRWIN")
AADD(aRet,"UA1125")
AADD(aRet,"UA1251")
AADD(aRet,"UA866")
AADD(aRet,"UAKOI8")
AADD(aRet,"UTF16LE")
AADD(aRet,"UTF8")
AADD(aRet,"UTF8EX")

RETURN aRet

in Sample of 1st link i got some Codepage but no DExxx :shock: which i have REQUEST

from Github Sample i use HB_CDPEXISTS() and a Array of Codepage "Name" and all get .T. :?

under HMG i have to REQUEST each Codepage which i want to use.
under Fivewin i can use DE850 without REQUEST :?:

i just want to avoid that User use a Codepage which is not available as i offer all
Image
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 58 guests