FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour UTF8 & MySql are 100% compatible with FWH?
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: UTF8 & MySql are 100% compatible with FWH?
Posted: Wed Jun 01, 2016 10:58 AM

This error indicates that some libs/obj files are of xharbour and some or of harbour.

I suggest we go step by step from a stage it is working for you.

Please let me know:
1) Did my first sample work for you?
2) If so did you use xHarbour or Harbour?

Regards



G. N. Rao.

Hyderabad, India
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: UTF8 & MySql are 100% compatible with FWH?
Posted: Thu Jun 02, 2016 02:00 AM

Dear Mr.Rao,

Yes, I do use Dolphin.lib that use with xHarbour 1.2.3. I thought it is compatible between xHarbour and Harbour.

  1. Yes, if you mean ADO.
  2. xHarbour and Harbour are working now (I found Dolphin for Harbour in the Forum).

But the data still cannot read.

Thanks in advance.

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: UTF8 & MySql are 100% compatible with FWH?
Posted: Thu Jun 02, 2016 02:26 AM

Please again try dolphin sample I sent you with your xHarbour and your libs for dolphin (dolphin lib for xharbour).
Please do not change anything except your connection parameters
Let us see what to do if you still have problem.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: UTF8 & MySql are 100% compatible with FWH?
Posted: Thu Jun 02, 2016 03:39 AM
Dear Mr.Rao,

nageswaragunupudi wrote:Please again try dolphin sample I sent you with your xHarbour and your libs for dolphin (dolphin lib for xharbour).
Please do not change anything except your connection parameters
Let us see what to do if you still have problem.


I've got the same result as picture.

image hosting free
Code (fw): Select all Collapse
#include "FiveWin.Ch"
#include "tdolphin.ch"
#include "xbrowse.ch"

static cpw := "nimda"
//----------------------------------------------------------------------------//

function Main()

   local oDlg, oBrw, oFont
   local oQry

   FW_SetUnicode( .T. )

   db()
   oQry  := TDolphinQry():New( "SELECT * FROM namesutf8", db() )

   DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-16

   DEFINE DIALOG oDlg SIZE 500,300 PIXEL TITLE FWVERSION + " : TDolphin" ;
      FONT oFont

   @ 10,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
      DATASOURCE oQry ;
      COLUMNS "code", "name" ;
      CELL LINES NOBORDER AUTOSORT FASTEDIT

   WITH OBJECT oBrw
      :nEditTypes := EDIT_GET
      //
      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED

   db():End()

return nil

//----------------------------------------------------------------------------//

function db()

   static oCn

   if oCn == nil
      CONNECT oCn ;
         HOST "localhost" USER "root" PASSWORD cpw DATABASE "easyfo"
   endif

return oCn

//----------------------------------------------------------------------------//
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: UTF8 & MySql are 100% compatible with FWH?
Posted: Thu Jun 02, 2016 03:43 AM

I shall send you the libs I am using to your personal mail.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: UTF8 & MySql are 100% compatible with FWH?
Posted: Thu Jun 02, 2016 12:00 PM
Dear Mr.Rao,

I try both version xHarbour and Harbour, it is not successful.
nageswaragunupudi wrote:I shall send you the libs I am using to your personal mail.

My email : dutchez4 @ gmail.com

Thank you in advance.
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: UTF8 & MySql are 100% compatible with FWH?
Posted: Thu Jun 02, 2016 12:35 PM
Dear Mr.Rao,

I got strange behavior for ADO and TDolphin.

1. When I type in ADO, TDolphin cannot read (AP).
2. When I type in TDolphin, ADO cannot read (AB).

upload images free

Any suggestion.

Thank you in advance.
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: UTF8 & MySql are 100% compatible with FWH?
Posted: Thu Jun 02, 2016 12:39 PM

Yes, strange.
In other words Dolphin is working for Unicode but ADO and Dolphin are not compatible with each other.
What about viewing in WorkBench?

For me both ADO and Dolphin are working together without any issues.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: UTF8 & MySql are 100% compatible with FWH?
Posted: Fri Jun 03, 2016 06:59 AM
Dear Mr.Rao,

There is another strange point. Both are not compatible with "MySqlQueryBrowser" or "MySql Workbench" of MySql.

image hosting gif
nageswaragunupudi wrote:Yes, strange.
In other words Dolphin is working for Unicode but ADO and Dolphin are not compatible with each other.
What about viewing in WorkBench?

For me both ADO and Dolphin are working together without any issues.


Finally. Are ADO / TDolphin / MySqlQueryBrowser not compatible ?
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: UTF8 & MySql are 100% compatible with FWH?
Posted: Fri Jun 03, 2016 08:28 AM

I can show ADO and Dolphin compatible. I try to send you the libs tonight.
I need to test more to achieve compatibility with Workbench also.

Regards



G. N. Rao.

Hyderabad, India
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: UTF8 & MySql are 100% compatible with FWH?
Posted: Fri Jun 03, 2016 08:45 AM

Hi Mr.Rao
I join this test for Chinese Unicode within MySQL/xHarbour/TMySQL
I will test 32bit and 64bit.
See you this forum or My EMail.

Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: UTF8 & MySql are 100% compatible with FWH?
Posted: Fri Jun 03, 2016 08:49 AM

Sure
We all work together

Regards



G. N. Rao.

Hyderabad, India
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: UTF8 & MySql are 100% compatible with FWH?
Posted: Fri Jun 03, 2016 12:21 PM
nageswaragunupudi wrote:Yes.
We can also provide support if you are using MySql through ADO.

This is a working sample:
Code (fw): Select all Collapse
#include "fivewin.ch"
#include "adodef.ch"

static oCn

//----------------------------------------------------------------------------//

function Main()

   local oRs, cSql, aStruct
   local cTable   := "namesutf8"

   FW_SetUnicode( .t. )

   ? "Connecting to MySql Server"
   oCn   := FW_OpenAdoConnection( "MYSQL,localhost,fwh,root,India@1947", .t. )
   if oCn == nil
      ? MsgStop( "Connect Fail" )
      return nil
   endif

   if .not. FW_AdoTableExists( cTable, oCn ) .or. ;
      MsgYesNo( "Recreate table " + cTable )

      TRY
         oCn:Execute( "DROP TABLE " + cTable )
      CATCH
      END

      aStruct  := { ;
         { "code", 'C', 2, 0 }, ;
         { "name", "VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci" } }

      FWAdoCreateTable( cTable, aStruct, oCn )

   endif

   oRs   := FW_OpenRecordSet( oCn, cTable )

   XBROWSER oRs FASTEDIT TITLE FWVERSION

   oRs:Close()

   oCn:Close()

return nil

//----------------------------------------------------------------------------//




This is 32bit(fwh1512)
I add new database fwh
Character set: utf8 -- UTF-8 Unicode
Collation: utf8_unicode_ci

when I run it and input Chinese Unicode and save, but not save it.
ok, so I use Navicat tool to input Chinese Unicode word "堃堃堃" and save it.
run this sample and appear "???"
Code (fw): Select all Collapse
{ "name", "VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci" } }
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: UTF8 & MySql are 100% compatible with FWH?
Posted: Fri Jun 03, 2016 12:41 PM
I suggest you first try with the table we already created, i.e., namesutf8 with utf8mb4 charset.
In the same table, please try to enter Chinese characters and save and test. After this test, we can try other variants.

I do not know Navicat tool.

But I am able to copy from webpage and paste any known language in this table

This table contains 6 languages. We are able to input, edit and view 6 languages at the same time. I entered 4 Indian languages from my keyboard using Google Input tools and 2 languages Chinese and Thai are copied from Web and pasted.

When it is possible to handle all these languages with ADO, I think it should not be a problem for using for Chinese or Thai
Regards



G. N. Rao.

Hyderabad, India
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: UTF8 & MySql are 100% compatible with FWH?
Posted: Fri Jun 03, 2016 04:30 PM
Hi Mr.Rao
Please look it.
http://www.fivetech.com.tw/downloads/Video_Unicode_MySQL_1.wmv

1.
if I use Navicat tool to input Unicode and run fwh EXE, I saw ???
Navicat support Unicode words. Sometimes we use tools to maintain database.( mean fwh's Unicode EXE must be know other tools input Unicode )

2.
I test utf8 and this character set. same not work.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit