Please try
WITH VARCHAR and PICTURE :
- Code: Select all Expand view
#include "fivewin.ch"
function Main()
local oDlg
local oGet
local cVar1 := "üäö"
FW_SetUnicode( .T. )
MsgInfo( "cVar1: " + Trim( cVar1 ) + CRLF + StrToHex( cVar1, " " ) )
DEFINE DIALOG oDlg SIZE 300, 300 PIXEL TRUEPIXEL
@ 20, 20 GET oGet VAR cVar1 SIZE 250,30 PIXEL OF oDlg PICTURE "@!" VARCHAR 70 ;
ON CHANGE oDlg:Update()
@ 60, 20 SAY cVar1 SIZE 250,30 PIXEL OF oDlg UPDATE
@ 100, 20 SAY STRTOHEX( cVar1, " " ) SIZE 260,60 PIXEL OF oDlg UPDATE
@ 200, 20 BUTTON "CHECK" SIZE 100,40 PIXEL OF oDlg ;
ACTION MsgInfo( "oGet/TGet(): " + Trim( cVar1 ) + CRLF + StrToHex( cVar1, " " ) )
ACTIVATE DIALOG oDlg CENTERED
MsgInfo( "cVar1: " + Trim( cVar1 ) + CRLF + StrToHex( cVar1, " " ) )
RETURN NIL
cVar1 changes WITHOUT editing, but that can not be right!And then
without VARCHAR and PICTURE
without editing:
- Code: Select all Expand view
@ 20, 20 GET oGet VAR cVar1 SIZE 250,30 PIXEL OF oDlg ;
ON CHANGE oDlg:Update()
cVar1 doesn't change, that's OK!
Editing also works, the encoding is and remains UTF8!:![Image](https://i.postimg.cc/1RdqQnB0/Screenshot-2023-10-12-091706.png)
---------------------------------
As a reminder: The correct
UTF8 hexcodes for 'üäö' are C3BC, C3A4 und C3B6,
not DC C4 D6, see for example
https://www.charset.org/utf-8!DC C4 D6 are the ANSI hexcodes