FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TMultiGet Unicode problem.(UNSOLVED)
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
TMultiGet Unicode problem.(UNSOLVED)
Posted: Thu Jul 24, 2025 01:23 PM
Hi,

I have started to use fwh 25.06. I am using Visual Studio 2022 32 bit and Harbour. I also use Windows manifest. Mr. Rao (RIP) solved the TGet and Turkish character problem explained in the link below.
https://forums.fivetechsupport.com/viewtopic.php?t=43874&start=120

I'm having a character problem similar to the TGet problem I had before, when using the TMultiget class in Fwh 2506 (using the GET command with the MEMO parameter).
 @ 56,10 GET oBG6 VAR XMG_6 OF oDlg PIXEL SIZE 184,60 UPDATE MEMO
I'm NOT using Unicode. I'm using the ANSI character set by using FW_SetUnicode( .F. ) at the beginning of my application. So far, I haven't had any problems with other classes in fwh 25.06
REQUEST HB_CODEPAGE_UTF8
REQUEST HB_CODEPAGE_UTF16LE
REQUEST HB_CODEPAGE_TRWIN

HB_CDPSELECT( "TRWIN" )
FW_SetUnicode( .F. )
TFont():nDefaultCharSet  := 162
The TMultiGet class always outputs its output variable as Unicode, which creates problems in my application. This problem occurs when I use only Turkish characters, and when I look at my variable with the isUTF8() function, it appears as .T.

Turkish characters.
A   Character   Ascii
1   Äž            208
2   Åž            222
3   İ            221
4   ÄŸ            240
5   ÅŸ            254
6   ı            253
I was previously using Fwh version 24.02. I had no problems. I know I need to provide an illustrative example to solve the problem, so I prepared the example below but I was not able to capture the behavior in my application.
#include "FiveWin.ch"

request HB_CODEPAGE_UTF8
request HB_CODEPAGE_UTF16LE
REQUEST HB_CODEPAGE_TRWIN

Function Main()
	Local oDlg, oFont
	Local oGet1
	local cVar1 := space(200)
	
	HB_CDPSELECT( "TRWIN" )
	FW_SetUnicode( .f. )
	TFont():nDefaultCharSet  := 162
	
	oFont := TFont():New("Verdana", 0, -11) 
	
	DEFINE DIALOG oDlg SIZE 500,150 PIXEL ;
		FONT oFont TITLE "Sample" ;
		STYLE nOr( WS_OVERLAPPEDWINDOW ) transparent
				
	@ 15,15 get oGet1 var cVar1 MEMO;
		size 200,40 of oDlg pixel 

   @ 60, 15 BUTTON "CHECK" SIZE 40, 10 PIXEL OF oDlg ;
      ACTION MsgInfo( ;
        "FW_SetUnicode():    " + cValToChar(FW_SetUnicode()) + CRLF + CRLF + ;
        "IsUTF8(cVar1):      " + cValToChar(IsUTF8(cVar1)) + CRLF + CRLF + ;
        "oGet1:lUnicode:     " + cValToChar(oGet1:lUnicode)  + CRLF + CRLF + ;
        "oDlg:lUnicode:      " + cValToChar(oDlg:lUnicode)  + CRLF + CRLF + ;
        "oGet1/TMultiGet():  " + cVar1 + " - " + StrToHex( cVar1, " " ) ;
         )  
			
	ACTIVATE DIALOG oDlg CENTER 
	
return nil
The example program above does not prove my claims.

1. I have deleted all my obj files and recompiled them. Nothing changed.
2. I used mget.prg from fwh 24.02. Nothing changed.

No matter what I did, I couldn't get the variables I used in the TMultiGet class in my application to be output in ANSI. I would be grateful for your help.
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: TMultiGet Unicode problem.
Posted: Tue Jul 29, 2025 01:29 PM

Antonio?

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: TMultiGet Unicode problem.
Posted: Tue Jul 29, 2025 05:37 PM

Dear Hakan,

I just saw your post. I missed it, sorry

If you remove the MEMO clause, does the error continues ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: TMultiGet Unicode problem.
Posted: Tue Jul 29, 2025 06:34 PM
Antonio Linares wrote: Dear Hakan,

I just saw your post. I missed it, sorry

If you remove the MEMO clause, does the error continues ?
Hi Antonio,

There is no problem when I delete the MEMO clause.

I noticed that although I defined SetUnicode(.F.) in my application, the oDlg:Unicode variable came as .T.
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: TMultiGet Unicode problem.
Posted: Wed Jul 30, 2025 05:42 AM

Your example seems to work fine here.

How to reproduce the error ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: TMultiGet Unicode problem.
Posted: Wed Jul 30, 2025 05:29 PM

Hi Antonio,

You're right. When I compile with buildh32.bat in the fwh\samples directory, I don't have any problems either.

However, when I type Turkish characters in my application, my GET with MEMO variables immediately change to Unicode. This problem started when I upgraded to version 25.06. It might be due to the 3rd-party libraries I'm using.

I'm not claiming there's a problem with the fwh library. I'm just looking for a solution. I don't want to search all the GET with MEMOs in my application and set the VALID of each one to UTF8toAnsi(). How can I do this through classes?

PS. I previously said that the oDlg:Unicode variable came as .T. I realized that was wrong. The oGet1:lUnicode variable is .T.

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: TMultiGet Unicode problem.
Posted: Wed Jul 30, 2025 06:14 PM
Antonio Linares wrote: Your example seems to work fine here.

How to reproduce the error ?
Hi Antonio,

I have found. please use rc file below.
1 24 "WindowsXP.Manifest"
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: TMultiGet Unicode problem.
Posted: Wed Jul 30, 2025 08:20 PM
Dear Hakan,

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: TMultiGet Unicode problem.
Posted: Wed Jul 30, 2025 08:28 PM

Hi Antonio,

please open virtual Turkish Q keyboard. and pres just Äž key.

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: TMultiGet Unicode problem.
Posted: Wed Jul 30, 2025 08:29 PM
How to do that ? :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: TMultiGet Unicode problem.
Posted: Wed Jul 30, 2025 08:35 PM
http://www.objekt.com.tr/fwh_test/mgettest1.png

First, install Turkish - Q keyboard to windows.
then windows run osk enter
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: TMultiGet Unicode problem.
Posted: Thu Jul 31, 2025 02:49 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: TMultiGet Unicode problem.
Posted: Thu Jul 31, 2025 05:48 AM
Hi Antonio,

Can you please read https://forums.fivetechsupport.com/viewtopic.php?p=267965#p267965

oGet1/TMultiGet(): G - 47 is not true. It should be Äž - D0. Your codepage is different from me.

Thanks.
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: TMultiGet Unicode problem.
Posted: Thu Jul 31, 2025 06:36 AM

I am getting here:

cp1254

1252

850

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: TMultiGet Unicode problem.
Posted: Thu Jul 31, 2025 07:03 AM

Hi Antonio,

My result is

cp1254

1254

857

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06