FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Korean character problem...
Posts: 476
Joined: Sat Feb 03, 2007 06:36 AM
Korean character problem...
Posted: Tue Nov 17, 2020 01:32 PM
Hello everyone.
I want to request help for this problem.
I have a need to present a field in Korean, which is stored correctly in a MySQL table and if I do the query, it is also presented correctly.
But at the moment of presenting it in my program I only see question marks ???

See the following image:


I already tried putting the FW_SetUnicode (.T.) Instruction at the start of my system, I already tried trying to convert the field with UTF16toUTF8 (oBase: FieldGet (7)), but nothing.
I am using Eagle1 for connection with MySQL and FWH 19.09

Does anyone know how to correctly present these characters in Korean with FWH?

Best regards.

Carlos Sincuir.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Korean character problem...
Posted: Tue Nov 17, 2020 03:58 PM

We can try to help you if you if you can load a sample table on a server in the cloud that both you and we can access.

We advise you to connect to this server in the cloud and create a small sample tale:

Server: 208.91.198.197
Username: gnraofwh
password: Bharat@1950
Database: fwhdemo
Port: 3306

Regards



G. N. Rao.

Hyderabad, India
Posts: 476
Joined: Sat Feb 03, 2007 06:36 AM
Re: Korean character problem...
Posted: Tue Nov 17, 2020 08:21 PM
Thanks Nages for your help.
I have already created the table in the cloud database.


Thanks in advance.

Best regards.

Carlos Sincuir
Posts: 476
Joined: Sat Feb 03, 2007 06:36 AM
Re: Korean character problem...
Posted: Wed Nov 18, 2020 12:30 PM
Hi Rao, I have another problem
I have noticed another problem with these Korean characters, when presenting them in a Get, they are not seen either


Could you help me with this other problem please

Best regards.

Carlos Sincuir
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Korean character problem...
Posted: Wed Nov 18, 2020 10:42 PM
Please try this small sample.

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

function Main()

   local oCn, oRs

   FW_SetUnicode( .t. )

   FWCONNECT oCn HOST "208.91.198.197:3306" USER "gnraofwh" PASSWORD "Bharat@1950" DATABASE "fwhdemo" PORT "3306"
   if oCn == nil
      ? "Connect fail"
      return nil
   endif

   oRs   := oCn:RowSet( "catcuentasconta" )
   XBROWSER oRs TITLE FWVERSION FASTEDIT AUTOFIT
   oRs:Close()

   oCn:Close()

return nil




This sample connects to the MySql server using the inbuilt MySql/Maria library, without using any 3rd party librarires.
Korean characters are read and displayed properly, you can edit and store Korean text and Gets also work properly.
Regards



G. N. Rao.

Hyderabad, India
Posts: 476
Joined: Sat Feb 03, 2007 06:36 AM
Re: Korean character problem...
Posted: Thu Nov 19, 2020 08:59 PM

thanks Rao, I'm going to do the tests

Best regards

Posts: 476
Joined: Sat Feb 03, 2007 06:36 AM
Re: Korean character problem...
Posted: Fri Nov 20, 2020 01:18 PM
Hi Rao,
I did the tests, and indeed your example works fine on my aplication.

What I don't understand is because if I'm using the same libraries and DLL's, TWBrowse and Get's won't work in a dialog from resources?
Is it not possible to use Korean characters in this way?


On the other hand, if I put FW_SetUnicode (.t.) in the start of my application, this no longer works:
Code (fw): Select all Collapse
REDEFINE GET oPass VAR cPass ID 12 OF oDlg PICTURE "@K ;
  CUEBANNER "Ingrese su Contraseña..."  BITMAP "search"
  
   oPass:lBtnTransparent := .t.       
   oPass:lPassword := .t.



The latter does not worry me so much, the former worries me more

Best regards.

Carlos Sincuir
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Korean character problem...
Posted: Fri Nov 20, 2020 04:24 PM

1) You should compulsorily use FW_SetUnicode( .t. ) at the beginning of your program.
There is no use of testing with and without this setting. That is only a waste of time.

2) All UI including Gets should work with resources too.

We can help you better if you post a very small sample prg and rc for testing at our end. (Hint: for Unicode test gets do not use any picture clause. Not even @K. Actually, with FWH gets, @K has not use. )

Regards



G. N. Rao.

Hyderabad, India
Posts: 476
Joined: Sat Feb 03, 2007 06:36 AM
Re: Korean character problem...
Posted: Sat Nov 21, 2020 01:20 PM

Mr. Rao, thank you for the support you are giving me to solve this problem.
Of course I can prepare a small project with so you can see how I am working.
What email address can I send the project to?

Best regards.

Carlos Sincuir

Continue the discussion