print utf8 word Incorrect

print utf8 word Incorrect

Postby richard-service » Thu Sep 07, 2017 11:16 am

Hi
Please look it. Preview user name not OK.

Image

This is a user name problem
Code: Select all  Expand view

::cE_NAMEx := ::Transfor_Data( AllTrim(::cE_NOm) )

::oPrn:CmSay(  1.75,  1  , "編 號:[ " + AllTrim(::cE_NOm)   + " ]" )
::oPrn:CmSay(  1.75,  5  , "姓 名:[ " + AllTrim(::cE_NAMEx) + " ]" )


METHOD Transfor_Data( cData ) CLASS TRpt_EmployeeSalaryDataMsf

LOCAL cTmpData := ""

      cData := AllTrim( cData )

      ::oEmployeeMsfDBx:cQuery := "SELECT * FROM EmployeeMsf WHERE E_NO = '"+cData+"' LIMIT 1 AND COMP_NO ='"+AllTrim(Left(cCP_NO,3))+"' "
      ::oEmployeeMsfDBx:Refresh()

      IF ::oEmployeeMsfDBx:LastRec() <> 0
         cTmpData := FW_UTF8PADCHAR(::oEmployeeMsfDBx:E_NAME, 10)     //=>MsgInfo User name No problem
         RETURN cTmpData
      ELSE
         RETURN cTmpData
      ENDIF

RETURN cTmpData
 


This is Item name No problem.
Code: Select all  Expand view

::oPrn:CmSay( nPrnRow,  0.5, HB_UTF8SUBSTR(::oEmployeeSalaryMsfDB:ITMNM,1,16), , , , )
::oPrn:CmSay( nPrnRow,  7  , Transform( ::oEmployeeSalaryMsfDB:SRYAT,"9,999,999")+" 元", , , , )
 
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v5.7 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 752
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: print utf8 word Incorrect

Postby nageswaragunupudi » Fri Sep 08, 2017 2:42 pm

does this work?
cTmpData := HB_UTF8LEFT(::oEmployeeMsfDBx:E_NAME, 10)
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10242
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: print utf8 word Incorrect

Postby richard-service » Fri Sep 08, 2017 4:03 pm

nageswaragunupudi wrote:does this work?
cTmpData := HB_UTF8LEFT(::oEmployeeMsfDBx:E_NAME, 10)


Mr.Rao
Not work.
cTmpData := HB_Utf8SubStr( ::oEmployeeMsfDBx:E_NAME, 1, 10 )
cTmpData := HB_UTF8LEFT(::oEmployeeMsfDBx:E_NAME, 10)
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v5.7 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 752
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: print utf8 word Incorrect

Postby nageswaragunupudi » Fri Sep 08, 2017 4:45 pm

Can you please try
? ::oEmployeeMsfDBx:E_NAME
? HB_UTF8LEFT(::oEmployeeMsfDBx:E_NAME, 10)
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10242
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: print utf8 word Incorrect

Postby richard-service » Fri Sep 08, 2017 4:55 pm

nageswaragunupudi wrote:Can you please try
? ::oEmployeeMsfDBx:E_NAME
? HB_UTF8LEFT(::oEmployeeMsfDBx:E_NAME, 10)


Mr.Rao
Yes, it can show, but not work when print.
ImageImage
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v5.7 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 752
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: print utf8 word Incorrect

Postby nageswaragunupudi » Fri Sep 08, 2017 5:07 pm

Now can you please try this?
? "姓 名:[ " + ::oEmployeeMsfDBx:E_NAME + " ]"
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10242
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: print utf8 word Incorrect

Postby richard-service » Fri Sep 08, 2017 5:26 pm

nageswaragunupudi wrote:Now can you please try this?
? "姓 名:[ " + ::oEmployeeMsfDBx:E_NAME + " ]"


Image

? "姓 名:"::oEmployeeMsfDBx:E_NAME

Image
Last edited by richard-service on Fri Sep 08, 2017 5:50 pm, edited 1 time in total.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v5.7 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 752
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: print utf8 word Incorrect

Postby nageswaragunupudi » Fri Sep 08, 2017 5:27 pm

That means + is giving problems.
That is adding strings byte wise not character wise
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10242
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: print utf8 word Incorrect

Postby richard-service » Fri Sep 08, 2017 5:32 pm

nageswaragunupudi wrote:That means + is giving problems.
That is adding strings byte wise not character wise


Mr.Rao
Chinese Report must be add some strings below:
列印區間: ::oDB:Date1 +"~"+ ::oDB:Date2
報表製作者: ::oDB:Maker
.......ETC


Any solution for it? or Don't use +
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v5.7 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 752
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: print utf8 word Incorrect

Postby nageswaragunupudi » Fri Sep 08, 2017 6:20 pm

Let me try
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10242
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: print utf8 word Incorrect

Postby richard-service » Tue Sep 12, 2017 4:57 am

nageswaragunupudi wrote:Let me try

Mr.Rao
I try it below:

Old code, only one line code
Code: Select all  Expand view

oPrn:Say( XX, YY , "列印區間:"+AllTrim(::cNo1) , oFnt2 )
 


for Unicode
Code: Select all  Expand view

oPrn:Say( XX, YY        , "列印區間:"                                 , oFnt2 )
oPrn:Say( XX, YY+210 , AllTrim(HB_UTF8LEFT(::cNo1,50)) , oFnt2 )
 


Coding load heave......
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v5.7 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 752
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: print utf8 word Incorrect

Postby richard-service » Wed Sep 13, 2017 3:47 am

richard-service wrote:
nageswaragunupudi wrote:Let me try

Mr.Rao
I try it below:

Old code, only one line code
Code: Select all  Expand view

oPrn:Say( XX, YY , "列印區間:"+AllTrim(::cNo1) , oFnt2 )
 


for Unicode
Code: Select all  Expand view

oPrn:Say( XX, YY        , "列印區間:"                                 , oFnt2 )
oPrn:Say( XX, YY+210 , AllTrim(HB_UTF8LEFT(::cNo1,50)) , oFnt2 )
 


Coding load heave......


Report command syntax not work
Code: Select all  Expand view

REPORT oReport                                  ;
   TITLE   Trim(cTitle)                         ,;
                    ""                                   ,;
"列印區間:"+ AllTrim(HB_UTF8LEFT(::cNo1, 10)) +" ~ " + AllTrim(HB_UTF8LEFT(::cNo2, 10)) + space(5) + ;
"製表人員:"+ AllTrim(HB_UTF8LEFT(_USER_NAME, 20)) + SPACE(3) +;
 


First work no problem
Second not work
"列印區間:"+ AllTrim(HB_UTF8LEFT(::cNo1, 10)) +" ~ " + AllTrim(HB_UTF8LEFT(::cNo2, 10)) + space(5) + ;
"製表人員:"+ AllTrim(HB_UTF8LEFT(_USER_NAME, 20)) + SPACE(3) +;


so HB_UTF8xxx() support +"~"+ not work "Chinese word" or "[" + "]" ....
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v5.7 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 752
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: print utf8 word Incorrect

Postby richard-service » Fri Oct 27, 2017 7:08 pm

Mr.Rao

Any news for it?
Today, I found problem from TReport

Code: Select all  Expand view

REPORT oReport                                  ;
            TITLE   Trim(cTitle)                         ,;
                       ""                                   ,;
                       "列印區間:"+ "目前顯示資料" + space(5) + ;
                       "製表人員:"+ AllTrim(HB_UTF8LEFT(_USER_NAME, 20)) + SPACE(3)      + ;
 


"製表人員:"+ AllTrim(HB_UTF8LEFT(_USER_NAME, 20))

not work. if I use MsgStop(_USER_NAME), it can show good Chinese text.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v5.7 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 752
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: Report utf8 word and Export Excel problem

Postby richard-service » Mon Oct 30, 2017 3:28 am

Hi
Today, I test it and find problem.

Image
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v5.7 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 752
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: print utf8 word Incorrect

Postby richard-service » Tue Dec 26, 2017 6:33 pm

Hi Mr.Rao and Antonio,

Any news for it?
I just saw fwh1712 not news for it.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v5.7 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 752
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Antonio Linares, driessen, Google [Bot] and 28 guests