- Code: Select all Expand view
- #include "fivewin.ch"
#define ID_GET 4001
#define ID_BUTTON 4002
REQUEST HB_CODEPAGE_UTF8
FUNCTION Main()
LOCAL oDlg
LOCAL oGet
LOCAL cVar1 := "üäö"
FW_SetUnicode( .T. )
DEFINE DIALOG oDlg RESOURCE "RES_UTF8"
REDEFINE GET oGet VAR cVar1 ID ID_GET PICTURE "@70" OF oDlg
//REDEFINE GET oGet VAR cVar1 ID ID_GET PICTURE "@!70" OF oDlg
REDEFINE BUTTON ID ID_BUTTON OF oDlg ACTION MsgInfo( "<cVar1>: " + Trim( cVar1 ) + CRLF + StrToHex( cVar1, " " ) )
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
- Code: Select all Expand view
- // RESOURCE SCRIPT generated by "Pelles C for Windows, version 12.00".
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#include "..\..\..\Program Files\PellesC\Include\Win\windows.h"
LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL
RES_UTF8 DIALOGEX DISCARDABLE 6, 18, 210, 142
STYLE DS_SHELLFONT|WS_POPUP|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
CAPTION "Dialog"
FONT 8, "Tahoma", 0, 0, 1
{
CONTROL "OK", IDOK, "Button", WS_TABSTOP, 160, 5, 45, 15
CONTROL "Cancel", IDCANCEL, "Button", WS_TABSTOP, 160, 23, 45, 15
CONTROL "Edit üöä 早晨好", 4001, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 4, 12, 64, 12
CONTROL "Show üöä مرحبا", 4002, "Button", WS_TABSTOP, 4, 44, 68, 14
}
Consequently, the same thing still happens in TGet(), see https://forums.fivetechsupport.com/viewtopic.php?f=3&t=43709&
Encoding is ok without PICTURE clause
- Code: Select all Expand view
- REDEFINE GET oGet VAR cVar1 ID ID_GET OF oDlg
- Code: Select all Expand view
- REDEFINE GET oGet VAR cVar1 ID ID_GET VARCHAR 70 OF oDlg