nageswaragunupudi wrote:We tried several times to reproduce your problem at our end with FWH2310 but could not. In other words, Ansi Gets are correctly working here as expected.
We enhanced the test we posted earlier for more detailed testing. This is the sample we tried.
- Code: Select all Expand view
#include "fivewin.ch"
REQUEST HB_CODEPAGE_TRWIN
function Main()
local oDlg, oGet, oFont, nKey := 0
local cVar := Space( 10 )
HB_CDPSELECT( "TRWIN" )
FW_SetUnicode( .f. )
SetGetColorFocus()
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-20 CHARSET 162 // Use the charset that works for you
DEFINE DIALOG oDlg SIZE 450,300 PIXEL TRUEPIXEL FONT oFont ;
TITLE FWVERSION
@ 40, 40 GET oGet VAR cVar SIZE 200,32 PIXEL OF oDlg ON CHANGE oDlg:Update()
oGet:bKeyChar := { |k| nKey := k }
@ 40,300 SAY { || "Key: " + Str( nKey, 3 ) } SIZE 120,30 PIXEL UPDATE
@ 80, 40 SAY { || StrToHex( Trim( cVar ), " " ) } SIZE 390,32 PIXEL OF oDlg UPDATE
@ 120, 40 SAY { || ListAsc( cVar ) } SIZE 390,70 PIXEL OF oDlg UPDATE
@ 200, 40 SAY { || If( IsWindowUnicode( oGet:hWnd ), "UTF8", "ANSI" ) + ;
" GET" } SIZE 200,32 PIXEL OF oDlg UPDATE
@ 200,310 BUTTON "CLOSE" SIZE 100,40 PIXEL OF oDlg ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
cVar := Trim( cVar )
? cVar, StrToHex( cVar ), IsUtf8( cVar )
return nil
static function ListAsc( cVar )
local aList := {}
local c
cVar := Trim( cVar )
for each c in cVar
AAdd( aList, ASC( c ) )
next
return FW_ArrayAsList( aList )
This is how it is working here.
When FW_SetUnicode( .F. ), no keychar is higher than 255 and none of the special or other characters are displayed as "?".
We request both of you to try this sample and point out the problem you are experiencing.
Hi Mr. Rao,
I have dowloaded fwh 23.10 and run above sample. As you said before, it says always "ANSI GET".
I have
deleted all my obj and
deleted tget and control prg in my mak file. compiled again. My first screen is login page. When I start to run my application, it say "ANSI GET" first, after than when i press any character (1, A, Ğ), it changes to "UTF8 GET"
For a moment, let us not bother about the font. Important for us is to check whether the Get is ANSI or Unicode
There is not any font problem anymore.