Page 1 of 2

To who use Chinese Language (another problem)

PostPosted: Mon Oct 27, 2008 3:58 pm
by dutch
I use FWH 8.04 and xHarbour.com 11/07.
I would like to show menu in Chinese Language.
- Source code file must be which format ANSI or Unicode or ??????
- Can I copy Chinese Text from Google Dictionary to paste in Source Code?
- Can I use MingLiU (standard windows vista font file)?

Regards,
Dutch

PostPosted: Tue Oct 28, 2008 1:42 am
by richard-service
Hi

I develop AP within Chinese in Taiwan

Regards,

Richard

PostPosted: Tue Oct 28, 2008 3:22 am
by dutch
Dear Richard,

Can you give me an idea about Chinese Language with FWH&xHarbour (as above posted)?

Thanks&Regards,
Dutch

PostPosted: Tue Oct 28, 2008 4:12 am
by richard-service
Hi

You mean this

Code: Select all  Expand view
DEFINE WINDOW ::oWnd             ;
            FROM 0, 0 TO 38, 130      ;
            TITLE "營運管理系統"        ;
             MENU ::Build_FW_Menu()

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

METHOD Build_FW_Menu() CLASS TMisPawn32

LOCAL oMenu

      MENU oMenu
   
         MENUITEM "基本管理"
            MENU
               MENUITEM "客戶類別資料維護"                   ;    && M000011001
                         RESOURCE "MN_CUSTTYPE"              ;
                         MESSAGE "執行客戶類別資料維護作業"  ;
                         ACTION ::RunCustType()
               MENUITEM "來電類型資料設定"                   ;    && M000011002
                         RESOURCE "MN_CallPhoneMsf"          ;
                         MESSAGE "執行來電類型資料設定作業"  ;
                         ACTION ::RunCallPhoneMsf()
..........




Regards,

Richard

PostPosted: Tue Oct 28, 2008 5:08 am
by dutch
Dear Richard,

Yes, exactly waht I want but I've got problem with source code file.
- Should It be ANSI format or Unicode or UTF-08?
- What kind of Font?
- Could you give me an example?

Thanks&Regards,
Dutch

PostPosted: Tue Oct 28, 2008 6:55 am
by kokookao2007
HI Dutch:

Microsoft Applocal can make it.

I work for Both Chinese Code (cht&chs).


--
Best Regards
--------------------------------------------------------------
kokoo KAO

PostPosted: Tue Oct 28, 2008 3:59 pm
by dutch
Dear kokookao & Richard,

I try Microsoft Applocale. I can try Chinese in notepad (ANSI format) but when I change keyboard to English, the Chinese word is appear. I don't know while.

What is source editor both of you use to type Chinese?

Regads,
Dutch

PostPosted: Wed Oct 29, 2008 12:59 am
by ShumingWang
Dutch,
If your windows installed Chinese fonts, app.exe from ascii code source ,could show Chinese words with windows default fonts .
You can use any editors to write harbour/clipper/fwh source code prg,rc .
Best Regards!
Shuming Wang

PostPosted: Wed Oct 29, 2008 2:20 am
by richard-service
ShumingWang wrote:Dutch,
If your windows installed Chinese fonts, app.exe from ascii code source ,could show Chinese words with windows default fonts .
You can use any editors to write harbour/clipper/fwh source code prg,rc .
Best Regards!
Shuming Wang


Hi Shuming,

You're right!!


Regards,

Richard

PostPosted: Wed Oct 29, 2008 5:17 am
by dutch
Dear All,

I've problem when I type Chinese, it show well. But when I change keyboard from Chinese to English, Chinese word is disappear.

Another case is after type Chinese word and save, it shows like Chinese is Unicode and it will be lost after save in ANSI format.

I use notepad to test it.
How can I fix it?

ImageImage
Thanks&Regards,
Dutch

PostPosted: Wed Oct 29, 2008 11:10 am
by richard-service
Hi

I use Multi-Edit and UEStudio work fine within Vista Chinese( CHT ).

Regards,

Richard

PostPosted: Wed Oct 29, 2008 11:23 am
by dutch
Dear Richard,

Do you mean you use UESTUDIO (Chinese Simplifield) version?

Regards,
Dutch

PostPosted: Wed Oct 29, 2008 12:20 pm
by richard-service
dutch wrote:Dear Richard,

Do you mean you use UESTUDIO (Chinese Simplifield) version?

Regards,
Dutch


Hi

No, I use UESTUDIO English version within Vista HP version( CHT ).
I input any Chinese word no problem.

Regards,

Richard

PostPosted: Wed Oct 29, 2008 12:59 pm
by dutch
Dear Richard,

I try as this code but it still shows wrong charactor. Could you test this code and let me know the result pls. Does it show correctly?

Code: Select all  Expand view
#include 'Fivewin.ch'

Function Main
local oWnd, oFont
local oTxtFile, nLines, n, cLines, aFonts

aFonts := {}

if file('FONT.INI')
   oTxtFile := TTxtFile():New('FONT.INI')
   nLines   := oTxtFile:RecCount()

   for n := 1 to nlines
        cLines := oTxtFile:ReadLine()
        if n = 6 .or. n = 7 .or. n = 8
            aadd( aFonts , if(cLines='.T.',.T.,.F.) )
        elseif n = 14
            aadd( aFonts , cLines )
        else
            aadd( aFonts , val(cLines) )
        end
       oTxtFile:Skip()
   next
   oTxtFile:Close()
   
end

   
DEFINE FONT oFont NAME "Microsoft JhengHei" SIZE 0, -12

   oFont:hFont := CreateFont( aFonts )


DEFINE WINDOW oWnd           ;
            FROM 0, 0 TO 38, 130      ;
            TITLE "營運管理系統"        ;
             MENU Build_FW_Menu()

     oWnd:oFont := oFont

ACTIVATE WINDOW oWnd
return nil
//-------------------------------------------------------------------------//

Function Build_FW_Menu()

LOCAL oMenu

      MENU oMenu
   
         MENUITEM "基本管理"
            MENU
               MENUITEM "客戶類別資料維護"                   ;    && M000011001
                         RESOURCE "MN_CUSTTYPE"              ;
                         MESSAGE "執行客戶類別資料維護作業" 
                         
               MENUITEM "來電類型資料設定"                   ;    && M000011002
                         RESOURCE "MN_CallPhoneMsf"          ;
                         MESSAGE "執行來電類型資料設定作業" 
   ENDMENU
ENDMENU
return oMenu


Thanks&regards,
Dutch

PostPosted: Wed Oct 29, 2008 2:32 pm
by richard-service
dutch wrote:Dear Richard,

I try as this code but it still shows wrong charactor. Could you test this code and let me know the result pls. Does it show correctly?

Code: Select all  Expand view
#include 'Fivewin.ch'

Function Main
local oWnd, oFont
local oTxtFile, nLines, n, cLines, aFonts

aFonts := {}

if file('FONT.INI')
   oTxtFile := TTxtFile():New('FONT.INI')
   nLines   := oTxtFile:RecCount()

   for n := 1 to nlines
        cLines := oTxtFile:ReadLine()
        if n = 6 .or. n = 7 .or. n = 8
            aadd( aFonts , if(cLines='.T.',.T.,.F.) )
        elseif n = 14
            aadd( aFonts , cLines )
        else
            aadd( aFonts , val(cLines) )
        end
       oTxtFile:Skip()
   next
   oTxtFile:Close()
   
end

   
DEFINE FONT oFont NAME "Microsoft JhengHei" SIZE 0, -12

   oFont:hFont := CreateFont( aFonts )


DEFINE WINDOW oWnd           ;
            FROM 0, 0 TO 38, 130      ;
            TITLE "營運管理系統"        ;
             MENU Build_FW_Menu()

     oWnd:oFont := oFont

ACTIVATE WINDOW oWnd
return nil
//-------------------------------------------------------------------------//

Function Build_FW_Menu()

LOCAL oMenu

      MENU oMenu
   
         MENUITEM "基本管理"
            MENU
               MENUITEM "客戶類別資料維護"                   ;    && M000011001
                         RESOURCE "MN_CUSTTYPE"              ;
                         MESSAGE "執行客戶類別資料維護作業" 
                         
               MENUITEM "來電類型資料設定"                   ;    && M000011002
                         RESOURCE "MN_CallPhoneMsf"          ;
                         MESSAGE "執行來電類型資料設定作業" 
   ENDMENU
ENDMENU
return oMenu


Thanks&regards,
Dutch


Hi

Your sample code work fine in my OS.

http://www.fivetech.com.tw/downloads/test-dutch.rar

Regards,

Richard