UTF8 SQL and FW_SetUnicode() / hb_cdpSelect()

UTF8 SQL and FW_SetUnicode() / hb_cdpSelect()

Postby Jimmy » Thu Jul 06, 2023 4:13 am

hi,

i use
Code: Select all  Expand view
  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: Select all  Expand view
  hb_cdpSelect( "UTF8" )

but still not correct

i need to use
Code: Select all  Expand view
  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
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: UTF8 SQL and FW_SetUnicode() / hb_cdpSelect()

Postby nageswaragunupudi » Thu Jul 06, 2023 9: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
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: UTF8 SQL and FW_SetUnicode() / hb_cdpSelect()

Postby Jimmy » Thu Jul 06, 2023 8: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
User avatar
Jimmy
 
Posts: 1725
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 90 guests