FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Compatibility issue: Harbour vs xHarbour/FiveWin
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Compatibility issue: Harbour vs xHarbour/FiveWin
Posted: Mon Jul 07, 2025 05:30 PM
Hello friends,
I’m currently testing a transition from xHarbour/FiveWin to Harbour, and I’m running into a compatibility issue with the following classic logic:

SET ORDER TO TAG ...
SET SCOPE TO "Ö"
This works perfectly in xHarbour, but under Harbour the result is incorrect or empty when using characters like "Ö", "Ä", etc.

🔍 What I suspect:
It seems that Harbour is missing the required codepage definitions, especially:

HB_CODEPAGE_DEWIN
HB_CODEPAGE_DE850
HB_CODEPAGE_CS852
HB_CODEPAGE_EL737
and the function hb_SetCodePage()

What I already tried:
Using REQUEST HB_CODEPAGE_DEWIN in my .prg

Compiling the matching .c files (cpdewin.c, uc1252.c, etc.)
Calling hb_SetCodePage("DEWIN") → results in unresolved external symbol
Checked the Harbour GitHub repository → hbcodepage.c is no longer there
Searched for hbcodepage.lib → not included in my build

My questions:
Is there a working way to get or build hbcodepage.lib for Harbour under Windows with BCC32 (no hbmk2)?

Alternatively: is it safe to use xhbcode.lib from an xHarbour/FiveWin build just to provide hb_SetCodePage() and required codepages?

Which files/symbols are strictly required to make SET SCOPE and SEEK() work properly with Umlauts and extended characters?

Thanks in advance,
Otto
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Compatibility issue: Harbour vs xHarbour/FiveWin
Posted: Mon Jul 07, 2025 07:29 PM

The correct name of the Harbour codepage lib is hbcpage.lib.

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Compatibility issue: Harbour vs xHarbour/FiveWin
Posted: Mon Jul 07, 2025 08:11 PM

Dear Enrico,

thanks again for pointing out that in xHarbour the file is named hbcpage.lib — that helped me a lot.

For my current project (a microservice with codepage support, JSON, and sockets), I’ve decided to go a slightly different route:

I’m embedding all additional functionality directly via #pragma BEGINDUMP.

I’ll only use .lib files when absolutely necessary (e.g. hbzlib.lib for GZIP compression).

I’ve also stripped down the .lib entries in my build.bat to the bare minimum.

With today’s AI-assisted workflow, I see clear advantages in keeping things transparent, inline, and fully under control — it makes debugging and extending much easier.

Best regards, Otto

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Compatibility issue: Harbour vs xHarbour/FiveWin
Posted: Mon Jul 07, 2025 08:52 PM
Otto wrote: Dear Enrico,

thanks again for pointing out that in xHarbour the file is named hbcpage.lib — that helped me a lot.
No:
- Harbour: hbcpage.lib
- xHarbour: codepage.lib

Continue the discussion