FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Test Unicode for Chinese Problem
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Test Unicode for Chinese Problem
Posted: Fri Oct 16, 2015 09:25 AM
Hi Antonio, Rao
1.Resource Get use Password style return value Empty, if password set No return value no problem.
2.Resource combobox not support Unicode. I put inot Get work file.
Style : Dropdown list
Owner draw : fixed
Code (fw): Select all Collapse
REDEFINE COMBOBOX oCbx VAR cCP_NO ITEMS aCompNo BITMAPS aBmp ID 101 OF oDlg

3.Menu's bmp position too top, maybe set middle.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Test Unicode for Chinese Problem
Posted: Fri Oct 16, 2015 10:19 AM

Richard,

Many thanks for your feedback,

We are reviewing those issues to provide a solution asap, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: Test Unicode for Chinese Problem
Posted: Fri Oct 16, 2015 04:07 PM
Hi Antonio,
1.MsgBar too heigh and bitmap too top

Old FWH version MsgBar


2.Menu need to Set Font, if not set font object and not show

Code (fw): Select all Collapse
DEFINE FONT oFnt NAME "Tahoma" SIZE 0,-12  

MENU oMenu 2007 FONT oFnt
         MENUITEM "&1.基本管理"
         MENU
            MENUITEM "廠商類別資料"

But I hope compatible old FWH version, I mean it don't need to set font and get Window font.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Test Unicode for Chinese Problem
Posted: Fri Oct 16, 2015 06:51 PM
Richard


2.Menu need to Set Font, if not set font object and not show


Build 3 is not necessary to assign the Font



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

static aEnglish := { "America", "European Continent", "Asia" }
static aTelugu  := { "[బ్రహ్మ దేవుడు]",  "[విష్ణు మూర్తి భగవానుడు ఎంతో పెద్ద పేరు]", "[&మహేశ్వర]" }
static aHindi   := { "[प्रारंभ]", "[दुनिया में सबसे बड़ी आबादी चीनी हैं]", "[तिहाई]" }
static aTamil   := { "[தொடக்கத்தில்]", "[உலகின் மிகப்பெரிய மக்கள் தொகை சீன உள்ளன]", "[மூன்றாவது]" }
static aGujarati:= { "[શરૂઆત]", "[વિશ્વમાં સૌથી વધુ વસ્તી ચિની છે]", "[ત્રીજા]" }
static aChinese := { "[開始]","[在世界上人口最多的是中國]","[第三]" }
static aKorean  := { "[출발]", "[세계에서 가장 큰 인구는 중국인]", "[세 번째]" }
static aThai    := { "[เริ่มต้น]", "[ประชากรมากที่สุดในโลกที่มีจีน]", "[ที่สาม]" }

static oFont

function main()

   local oWNd, oBar, oBrw, aData, miItem
   local cLog := cFileSetExt( ExeName(), "log" )

   FErase( cLog )

   FW_SetUnicode( .t. )

   DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-12

   DEFINE WINDOW oWnd MENU MainMenu() TITLE FWVERSION
   DEFINE BUTTONBAR oBar OF oWnd SIZE 100,32 _3D
   DEFINE BUTTON OF oBar PROMPT "TestDialog" CENTER ACTION TestDialog()

   oWnd:nWidth    := 700

   ACTIVATE WINDOW oWnd CENTER

   if File( cLog )
      //WinExec( "notepad.exe " + cLog )
   endif

   RELEASE FONT oFont

return nil

function MainMenu()

   local oMenu
   local aPrompt := aChinese //aTamil  //aEnglish //

   MENU oMenu 2007
      MENUITEM aPrompt[ 1 ]
      MENU
         MENUITEM "ఇక చాల్లెండి"
         SEPARATOR
         MENUITEM "ఈయన సృష్టి కర్త" + Chr( 13 ) + "ఇక చాల్లెండి" FILE "c:\fwh\bitmaps\16x16\open.bmp"
         SEPARATOR
         MENUITEM aPrompt[ 2 ]
         MENUITEM aPrompt[ 3 ]
      ENDMENU
      MENUITEM aPrompt[ 2 ] ACTION TestDialog() 
      MENU
         MENUITEM aPrompt[ 2 ] + " " + aPrompt[ 1 ] + Chr( 9 ) + "ALt+F" //FILE "c:\fwh\bitmaps\16x16\open.bmp"
         MENUITEM aPrompt[ 3 ] //+ Chr( 9 ) + "Alt+M" ACTION MsgInfo( "Here" )
      ENDMENU
      MENUITEM aPrompt[ 3 ]
      MENU
         MENUITEM aPrompt[ 1 ]
         MENUITEM aPrompt[ 2 ] + Chr( 9 ) + "ALt+F" FILE "c:\fwh\bitmaps\16x16\open.bmp"
         MENUITEM aPrompt[ 3 ] //+ Chr( 9 ) + "Alt+M" ACTION MsgInfo( "Here" )
      ENDMENU
   ENDMENU

return oMenu

function TestDialog

   local oDlg

   DEFINE DIALOG oDlg SIZE 700,300 PIXEL
   ACTIVATE DIALOG oDlg CENTERED ON INIT oDlg:SetMenu( MainMenu() )

return nil



But I hope compatible old FWH version, I mean it don't need to set font and get Window font


For compatibility with all previous versions, the menus do not pick the font window. If not defined font, the menu takes the font of system .
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: Test Unicode for Chinese Problem
Posted: Sat Oct 17, 2015 02:51 AM
cnavarro wrote:Richard


2.Menu need to Set Font, if not set font object and not show


Build 3 is not necessary to assign the Font



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

static aEnglish := { "America", "European Continent", "Asia" }
static aTelugu  := { "[బ్రహ్మ దేవుడు]",  "[విష్ణు మూర్తి భగవానుడు ఎంతో పెద్ద పేరు]", "[&మహేశ్వర]" }
static aHindi   := { "[प्रारंभ]", "[दुनिया में सबसे बड़ी आबादी चीनी हैं]", "[तिहाई]" }
static aTamil   := { "[தொடக்கத்தில்]", "[உலகின் மிகப்பெரிய மக்கள் தொகை சீன உள்ளன]", "[மூன்றாவது]" }
static aGujarati:= { "[શરૂઆત]", "[વિશ્વમાં સૌથી વધુ વસ્તી ચિની છે]", "[ત્રીજા]" }
static aChinese := { "[開始]","[在世界上人口最多的是中國]","[第三]" }
static aKorean  := { "[출발]", "[세계에서 가장 큰 인구는 중국인]", "[세 번째]" }
static aThai    := { "[เริ่มต้น]", "[ประชากรมากที่สุดในโลกที่มีจีน]", "[ที่สาม]" }

static oFont

function main()

   local oWNd, oBar, oBrw, aData, miItem
   local cLog := cFileSetExt( ExeName(), "log" )

   FErase( cLog )

   FW_SetUnicode( .t. )

   DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-12

   DEFINE WINDOW oWnd MENU MainMenu() TITLE FWVERSION
   DEFINE BUTTONBAR oBar OF oWnd SIZE 100,32 _3D
   DEFINE BUTTON OF oBar PROMPT "TestDialog" CENTER ACTION TestDialog()

   oWnd:nWidth    := 700

   ACTIVATE WINDOW oWnd CENTER

   if File( cLog )
      //WinExec( "notepad.exe " + cLog )
   endif

   RELEASE FONT oFont

return nil

function MainMenu()

   local oMenu
   local aPrompt := aChinese //aTamil  //aEnglish //

   MENU oMenu 2007
      MENUITEM aPrompt[ 1 ]
      MENU
         MENUITEM "ఇక చాల్లెండి"
         SEPARATOR
         MENUITEM "ఈయన సృష్టి కర్త" + Chr( 13 ) + "ఇక చాల్లెండి" FILE "c:\fwh\bitmaps\16x16\open.bmp"
         SEPARATOR
         MENUITEM aPrompt[ 2 ]
         MENUITEM aPrompt[ 3 ]
      ENDMENU
      MENUITEM aPrompt[ 2 ] ACTION TestDialog() 
      MENU
         MENUITEM aPrompt[ 2 ] + " " + aPrompt[ 1 ] + Chr( 9 ) + "ALt+F" //FILE "c:\fwh\bitmaps\16x16\open.bmp"
         MENUITEM aPrompt[ 3 ] //+ Chr( 9 ) + "Alt+M" ACTION MsgInfo( "Here" )
      ENDMENU
      MENUITEM aPrompt[ 3 ]
      MENU
         MENUITEM aPrompt[ 1 ]
         MENUITEM aPrompt[ 2 ] + Chr( 9 ) + "ALt+F" FILE "c:\fwh\bitmaps\16x16\open.bmp"
         MENUITEM aPrompt[ 3 ] //+ Chr( 9 ) + "Alt+M" ACTION MsgInfo( "Here" )
      ENDMENU
   ENDMENU

return oMenu

function TestDialog

   local oDlg

   DEFINE DIALOG oDlg SIZE 700,300 PIXEL
   ACTIVATE DIALOG oDlg CENTERED ON INIT oDlg:SetMenu( MainMenu() )

return nil



But I hope compatible old FWH version, I mean it don't need to set font and get Window font


For compatibility with all previous versions, the menus do not pick the font window. If not defined font, the menu takes the font of system .


Hi cnavarro,
I got my now project to test fwh1509b3 and show picture to your. Please check it.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: Test Unicode for Chinese Problem
Posted: Sat Oct 17, 2015 04:13 AM
Hi Antonio, Rao

1.I can't input Chinese(include Unicode word), can input number 0~9 and English A~Z
Code (fw): Select all Collapse
CLASS TDepMsf

    DATA oDEP_NO, oDEP_NAME

//----------------------------------------------------------------------------//

METHOD Open() CLASS TDepMsf

   oServer:SelectDB("WinCurtainErp")

   ::oDB := oServer:Query("SELECT * FROM depmsf ORDER BY dep_no")

RETURN NIL

//----------------------------------------------------------------------------//

METHOD ReGet() CLASS TDepMsf

 REDEFINE GET ::oDEP_NO    VAR ::oDB:DEP_NO    ID 101 OF ::oDlg UPDATE
 REDEFINE GET ::oDEP_NAME  VAR ::oDB:DEP_NAME  ID 102 OF ::oDlg UPDATE

RETURN NIL

But input any word(include Unicode)
Code (fw): Select all Collapse
//----------------------------------------------------------------------------//

METHOD PrnData() CLASS TDepMsf
LOCAL oDlg, oGet1, oGet2
LOCAL cDEP_NO   := SPACE(3)
LOCAL cDEP_NAME := SPACE(30)

          DEFINE DIALOG oDlg RESOURCE "D_DR_WIN_DEPMSF_PRN" FONT oFnt1

             REDEFINE GET oGet1 VAR cDEP_NO   ID 101 OF oDlg
             REDEFINE GET oGet2 VAR cDEP_NAME ID 102 OF oDlg
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Test Unicode for Chinese Problem
Posted: Sat Oct 17, 2015 06:41 AM
Richard



Code (fw): Select all Collapse
function MainMenu()

   local oMenu
   local aPrompt := aChinese //aTamil  //aEnglish //

   MENU oMenu 2007
      MENUITEM "&1.基本管理"
      MENU
         MENUITEM "廠商類別資料"
         MENUITEM "基本管理"
      ENDMENU
      MENUITEM aPrompt[ 1 ]
      MENU
         MENUITEM "ఇక చాల్లెండి"
         SEPARATOR
         MENUITEM "ఈయన సృష్టి కర్త" + Chr( 13 ) + "ఇక చాల్లెండి" FILE "c:\fwh\bitmaps\16x16\open.bmp"
         SEPARATOR
         MENUITEM aPrompt[ 2 ]
         MENUITEM aPrompt[ 3 ]
      ENDMENU
      MENUITEM aPrompt[ 2 ] ACTION TestDialog() 
      MENU
         MENUITEM aPrompt[ 2 ] + " " + aPrompt[ 1 ] + Chr( 9 ) + "ALt+F" //FILE "c:\fwh\bitmaps\16x16\open.bmp"
         MENUITEM aPrompt[ 3 ] //+ Chr( 9 ) + "Alt+M" ACTION MsgInfo( "Here" )
      ENDMENU
      MENUITEM aPrompt[ 3 ]
      MENU
         MENUITEM aPrompt[ 1 ]
         MENUITEM aPrompt[ 2 ] + Chr( 9 ) + "ALt+F" FILE "c:\fwh\bitmaps\16x16\open.bmp"
         MENUITEM aPrompt[ 3 ] //+ Chr( 9 ) + "Alt+M" ACTION MsgInfo( "Here" )
      ENDMENU
   ENDMENU

return oMenu
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: Test Unicode for Chinese Problem
Posted: Sat Oct 17, 2015 09:57 AM
cnavarro wrote:Richard



Code (fw): Select all Collapse
function MainMenu()

   local oMenu
   local aPrompt := aChinese //aTamil  //aEnglish //

   MENU oMenu 2007
      MENUITEM "&1.基本管理"
      MENU
         MENUITEM "廠商類別資料"
         MENUITEM "基本管理"
      ENDMENU
      MENUITEM aPrompt[ 1 ]
      MENU
         MENUITEM "ఇక చాల్లెండి"
         SEPARATOR
         MENUITEM "ఈయన సృష్టి కర్త" + Chr( 13 ) + "ఇక చాల్లెండి" FILE "c:\fwh\bitmaps\16x16\open.bmp"
         SEPARATOR
         MENUITEM aPrompt[ 2 ]
         MENUITEM aPrompt[ 3 ]
      ENDMENU
      MENUITEM aPrompt[ 2 ] ACTION TestDialog() 
      MENU
         MENUITEM aPrompt[ 2 ] + " " + aPrompt[ 1 ] + Chr( 9 ) + "ALt+F" //FILE "c:\fwh\bitmaps\16x16\open.bmp"
         MENUITEM aPrompt[ 3 ] //+ Chr( 9 ) + "Alt+M" ACTION MsgInfo( "Here" )
      ENDMENU
      MENUITEM aPrompt[ 3 ]
      MENU
         MENUITEM aPrompt[ 1 ]
         MENUITEM aPrompt[ 2 ] + Chr( 9 ) + "ALt+F" FILE "c:\fwh\bitmaps\16x16\open.bmp"
         MENUITEM aPrompt[ 3 ] //+ Chr( 9 ) + "Alt+M" ACTION MsgInfo( "Here" )
      ENDMENU
   ENDMENU

return oMenu


Ok, I try to clear all 3rd-party LIBs and ReBuild clear project again.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Test Unicode for Chinese Problem
Posted: Sat Oct 17, 2015 10:20 AM

Richard

If you need help, you can send me a mail

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Test Unicode for Chinese Problem
Posted: Sat Oct 17, 2015 01:55 PM
richard-service wrote:Hi Antonio, Rao
1.Resource Get use Password style return value Empty, if password set No return value no problem.
2.Resource combobox not support Unicode. I put inot Get work file.
Style : Dropdown list
Owner draw : fixed
Code (fw): Select all Collapse
REDEFINE COMBOBOX oCbx VAR cCP_NO ITEMS aCompNo BITMAPS aBmp ID 101 OF oDlg

3.Menu's bmp position too top, maybe set middle.


Richard
Resource combobox support Unicode
Code (fw): Select all Collapse
//LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
general DIALOG 18, 18, 286, 223
STYLE DS_3DLOOK | DS_SETFONT | WS_CHILDWINDOW
FONT 8, "Tahoma"
//FONT 8, "Ms Sans Serif"
{
    LTEXT           "Language", 0, 16, 18, 33, 8, SS_LEFT, WS_EX_LEFT
    COMBOBOX        100, 57, 17, 146, 48, WS_TABSTOP | CBS_DROPDOWNLIST, WS_EX_LEFT
    AUTOCHECKBOX    "Duplicates on functions panel", 110, 17, 178, 163, 8, 0, WS_EX_LEFT
}


Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: Test Unicode for Chinese Problem
Posted: Sat Oct 17, 2015 05:38 PM
cnavarro wrote:
richard-service wrote:Hi Antonio, Rao
1.Resource Get use Password style return value Empty, if password set No return value no problem.
2.Resource combobox not support Unicode. I put inot Get work file.
Style : Dropdown list
Owner draw : fixed
Code (fw): Select all Collapse
REDEFINE COMBOBOX oCbx VAR cCP_NO ITEMS aCompNo BITMAPS aBmp ID 101 OF oDlg

3.Menu's bmp position too top, maybe set middle.


Richard
Resource combobox support Unicode
Code (fw): Select all Collapse
//LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
general DIALOG 18, 18, 286, 223
STYLE DS_3DLOOK | DS_SETFONT | WS_CHILDWINDOW
FONT 8, "Tahoma"
//FONT 8, "Ms Sans Serif"
{
    LTEXT           "Language", 0, 16, 18, 33, 8, SS_LEFT, WS_EX_LEFT
    COMBOBOX        100, 57, 17, 146, 48, WS_TABSTOP | CBS_DROPDOWNLIST, WS_EX_LEFT
    AUTOCHECKBOX    "Duplicates on functions panel", 110, 17, 178, 163, 8, 0, WS_EX_LEFT
}





Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Test Unicode for Chinese Problem
Posted: Sat Oct 17, 2015 05:50 PM

Please
Try before showing the combobox

Xbrowser (<array combobox>)

and display the result

Thanks

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: Test Unicode for Chinese Problem
Posted: Sat Oct 17, 2015 05:56 PM
cnavarro wrote:Please
Try before showing the combobox

Xbrowser (<array combobox>)

and display the result

Thanks


if not add bitmap and work fine.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Test Unicode for Chinese Problem
Posted: Sat Oct 17, 2015 06:43 PM

OK,
I have not tried with a Bitmap in the combo

Thanks

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: Test Unicode for Chinese Problem
Posted: Thu Oct 22, 2015 10:17 AM

Hi Antonio, Rao, Cnavarro
Unicode not support
1.input password Get
2.Bmp within combobox
3.when copy Unicode word and paste to Get( forcus in first ) work fine.But when cursor move to some words and ( delete or insert words and paste Unicode ) not work

I wait your fix these problem and how long upgrade Build 4?

Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit