FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Chinese
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Chinese
Posted: Tue Jun 16, 2015 11:47 AM
Hi,
I have to print somethink like this: English and Chinese text togheter


How can I do that?

I usually use a program written in CAVO2.5 and libreries ReportPro 2.10
But all my programs are written in fivewin/xHarbour.
Any hints?

Marco
Marco Boschi
info@marcoboschi.it
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Chinese
Posted: Tue Jun 16, 2015 12:06 PM

Marco,

Please review FWH\samples\unicode.prg

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Chinese
Posted: Tue Jun 16, 2015 12:42 PM
Antonio,
I have ad old version and I obtain this
Marco Boschi
info@marcoboschi.it
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Chinese
Posted: Tue Jun 16, 2015 01:08 PM

For me it worked with Menus, Says on Window and WBrowse.

Regards



G. N. Rao.

Hyderabad, India
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Re: Chinese
Posted: Wed Jun 17, 2015 03:41 AM

Your windows should install Chinese fonts .Print English letters and Chinese word can be mixed together .

Shuming Wang
来自广东省广州市
Come from Guangzhou City,Guangdong Province

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Chinese
Posted: Wed Jun 17, 2015 09:32 AM
S.W.,
this is a screenshot uf unicode.exe in my windows 7 pc.



I noticed that if unicode.exe lost focus and then takes it back Chinese characters are substituted with ????

What do you think by adding a button that prints... will work ?
And what about to store the content of oGet into a dbf field?

Many thanks

Marco
Marco Boschi
info@marcoboschi.it
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Re: Chinese
Posted: Wed Jun 17, 2015 10:15 AM

Oh!I use Chinese GBK ,or GB2312 Code,Chinese words same as other strings,PRG without any setting ,Windows control panel should choose Chinese language.
In the past ,FWH not supported Unicode. I have not upgraded FWH into new version.

Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Chinese
Posted: Wed Jun 17, 2015 12:05 PM
Marco,

With FWH 15.05 build 4 looks like this on Windows 10:

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Chinese
Posted: Wed Jun 17, 2015 02:26 PM
Antonio,
there is a colleague who modify this program in such a way that it works in the Chinese language?
I can not understand Whether it is possible

Many Thanks
Marco

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


FUNCTION MAIN()

LOCAL oDlg
LOCAL oSay  , cSay := "Chinese Text "
LOCAL oGet1 , cGet1 := SPACE( 20 )
LOCAL oGet2 , cGet2 := SPACE( 20 )
LOCAL oBut1 , oBut2

IF !FILE( "TESTCHINA.DBF" )
   DBCREATE( "TESTCHINA" , { { "CINESE1", "C", 20, 0 } , { "CINESE2", "C", 20, 0 }} )
ENDIF

USE testchina

GO BOTTOM

cGet1 := field->cinese1
cGet2 := field->cinese2


DEFINE DIALOG oDlg

@ 1 ,  1 SAY oSay PROMPT cSay OF oDlg
@ 2 ,  1 GET oGet1 VAR cGet1 OF oDlg
@ 3 ,  1 GET oGet2 VAR cGet2 OF oDlg
@ 3 ,  1 BUTTON oBut2 PROMPT "WRITE" ACTION write_dbf( cGet1 , cGet2 )
@ 3 , 10 BUTTON oBut1 PROMPT "PRINT" ACTION MsgInfo( "Print get content" )

ACTIVATE DIALOG oDlg
CLOSE DATABASE

RETURN NIL
FUNCTION WRITE_DBF( cGet1 , cGet2 )

APPEND BLANK
REPLACE field->cinese1  WITH cGet1
REPLACE field->cinese2  WITH cGet2


RETURN NIL
Marco Boschi
info@marcoboschi.it
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Chinese
Posted: Wed Jun 17, 2015 03:02 PM

Marco,

There are several FWH users from China on these forums that surely will be able to help you.

I am sorry I have no more expertise on this area

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Chinese
Posted: Wed Jun 17, 2015 06:10 PM

Antonio,
Thankyou
Marco

Marco Boschi
info@marcoboschi.it
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: Chinese
Posted: Thu Jun 18, 2015 04:49 AM
MarcoBoschi wrote:Hi,
I have to print somethink like this: English and Chinese text togheter


How can I do that?

I usually use a program written in CAVO2.5 and libreries ReportPro 2.10
But all my programs are written in fivewin/xHarbour.
Any hints?

Marco


FWH not support full Unicode function, not input Chinese word.
so suggestion
if you just display chinese and english
install chinese font and set code for chinese font( from dbf and chinese inside )
if you input chinese word and english
install chinese OS and modify TGet.prg( support chinese two bytes and control key functions )
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: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Chinese
Posted: Thu Jun 18, 2015 08:06 AM

Richard,
many thanks
I've just wrote you by mail
Marco

Marco Boschi
info@marcoboschi.it
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: Chinese
Posted: Thu Jun 18, 2015 08:10 AM
MarcoBoschi wrote:Richard,
many thanks
I've just wrote you by mail
Marco

ok. I got 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

Continue the discussion