FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour UTF8 SQL and FW_SetUnicode() / hb_cdpSelect()
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
UTF8 SQL and FW_SetUnicode() / hb_cdpSelect()
Posted: Thu Jul 06, 2023 04:13 AM
hi,

i use
Code (fw): Select all Collapse
   hb_LangSelect( cLangCode )
   hb_cdpSelect( cCodepage )
to display DIRECTORY() in TGrid()

now i try to show SQL-Table in TGrid() but FIELD Type "C" with "Umlaute" does show not correct :(
i try
Code (fw): Select all Collapse
   hb_cdpSelect( "UTF8" )
but still not correct

i need to use
Code (fw): Select all Collapse
   cText := hb_Translate( cText, "UTF8", hb_CDPSELECT() )
so what i´m doing wrong :?:

---

i can use XBROWSER with "same Data" and "Umlaute" are show correct :D

what does Fivewin "have" what i miss in TGrid() :?:
greeting,

Jimmy
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: UTF8 SQL and FW_SetUnicode() / hb_cdpSelect()
Posted: Thu Jul 06, 2023 09:30 AM

FWH never used hb_translate() anywhere.

It all depends on what function are you using to output text to hDC in your TGrid class.

Please compare with xbrowse.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: UTF8 SQL and FW_SetUnicode() / hb_cdpSelect()
Posted: Thu Jul 06, 2023 08:38 PM
hi,

Sign are from SQL-Server, which is configure as UTF-8, are paint into hDC "as it is" and display UTF-8
"same" Data display in XBROWSER show Sign "right" as DEWIN so "somewhere" must be a "translate" ... but "where" :?:

---

i have try to use FW_SetUnicode(.T.) and hb_cdpSelect("UTF9") but it does not change "display" in TGrid()

it does work with HMG and Xbase++ but not with Fivewin ... what do i misunderstood :?:
greeting,

Jimmy

Continue the discussion