FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour MariaDB with latin5_turkish_ci collation
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Converting dbf files to MariaDB with importfromdbf
Posted: Sat Apr 11, 2020 10:37 PM

I am asking Rao to review it, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Converting dbf files to MariaDB with importfromdbf
Posted: Sun Apr 12, 2020 11:50 AM

Hi,

I can convert my dbf file to MariaDB using importfromdbf with "latin5_turkish_ci". I see the right characters in HeidiSQL. There is not problem.

But all turkish characters are shown "?" in gets and xbrowse.

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Converting dbf files to MariaDB with importfromdbf
Posted: Sat Apr 18, 2020 11:24 AM

Hi,

Is it possible?. Is there any scheduled time?

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Converting dbf files to MariaDB with importfromdbf
Posted: Wed Apr 29, 2020 09:03 AM

Hi Mr. Rao,

Is there any hope?

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Converting dbf files to MariaDB with importfromdbf
Posted: Wed Apr 29, 2020 09:50 AM

Please give me a little time.
We both will try and find a solution soon.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Converting dbf files to MariaDB with importfromdbf
Posted: Wed Apr 29, 2020 10:25 AM
nageswaragunupudi wrote:Please give me a little time.
We both will try and find a solution soon.


OK.
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: MariaDB with latin5_turkish_ci collation
Posted: Fri May 15, 2020 02:36 PM

up!

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: MariaDB with latin5_turkish_ci collation
Posted: Wed May 27, 2020 03:52 PM

up!!

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: MariaDB with latin5_turkish_ci collation
Posted: Mon Jun 01, 2020 04:14 PM
Hi,

My research:

In HeidiSQL my Data.

In HeidiSQL. We try to use latin5, latin5 is ISO 8859-9 Turkish.

in https://harbour.github.io/doc/harbour.htmlIn selected line says Language identifier is TRISO.

My Main app.

Code (fw): Select all Collapse
? HB_CDPSELECT()
Result is TRISO.

But the result is same. There is still Turkish character problem. It displays "?".


What should I check next.
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: MariaDB with latin5_turkish_ci collation
Posted: Mon Jun 01, 2020 05:39 PM
Hi Mr. Rao,

If I change this line like that
Code (fw): Select all Collapse
FW_SetUnicode( .t. )

All Turkish characters is OK. But the data is read from database is unicode.
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: MariaDB with latin5_turkish_ci collation
Posted: Tue Jun 02, 2020 03:38 AM

May I ask, if you browse a DBF with the same Turkish character data, are you able to see the data correctly, with FW_SetUnicode( .f. ) ?

Regards



G. N. Rao.

Hyderabad, India
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: MariaDB with latin5_turkish_ci collation
Posted: Tue Jun 02, 2020 09:40 AM
nageswaragunupudi wrote:May I ask, if you browse a DBF with the same Turkish character data, are you able to see the data correctly, with FW_SetUnicode( .f. ) ?


Hi Mr. Rao,

If you asking dbfcdx using, Yes.
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: MariaDB with latin5_turkish_ci collation
Posted: Tue Jun 02, 2020 02:48 PM
Does this DBF browse display correctly? Please confirm.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: MariaDB with latin5_turkish_ci collation
Posted: Tue Jun 02, 2020 03:53 PM
Hi Mr. Rao,

I have found the smssablon.dbf that is referred by you.

I have transferred to mariadb via Importfromdbf with "latin5_turkish_ci" charset.





with this code:
Code (fw): Select all Collapse
    REQUEST HB_CODEPAGE_TRWIN
    HB_CDPSELECT( "TRWIN" )

    //ISO 8859-9 Turkish - It does not matter with TRWIN.
//  REQUEST HB_CODEPAGE_TRISO
//  HB_CDPSELECT( "TRISO" )
    
    cObj_Charset := "latin5_turkish_ci"
    FW_SetUnicode( .t. )
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: MariaDB with latin5_turkish_ci collation
Posted: Tue Jun 02, 2020 05:07 PM
I have imported the above dbf to mysql with this program.
XBrowse of the MySql matches with the xbrowse of the dbf.
I do not find any ?? in the display.

I did not set FW_SetUnicode( .t. ).
So, this is not a Unicode application.

Code (fw): Select all Collapse
#include "fivewin.ch"

REQUEST DBFCDX
REQUEST HB_CODEPAGE_TRWIN

static oCn

function Main()

   local cDbf     := "turkish\smssblon.dbf"
   local cTable   := cFileNoExt( cDbf )

   HB_CDPSELECT( "TRWIN" )

   RDDSETDEFAULT( "DBFCDX" )

   oCn := FW_DemoDB()
   if oCn == nil
      ? "Connnect Fail"
      return nil
   endif
   ? oCn:cServerInfo
   if oCn:TableExists( cTable )
      oCn:DropTable( cTable )
   endif
   oCn:ImportFromDbf( cDbf )

   XBROWSER cDbf NOMODAL
   XBROWSER oCn:smssblon

   oCn:Close()

return nil




I do not see any problem.
Regards



G. N. Rao.

Hyderabad, India