Euro sign in Word with Harbour

Euro sign in Word with Harbour

Postby Maurizio » Wed May 29, 2013 4:44 pm

Hello
I have a probelm with Euro sign and HArbour

This works well with xHarbour
oText:TypeText( "€ " + "123.00")

in Harbour I have Ç 123,00 ( in video and in print )

some solution ?

Regard MAurizio
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: Euro sign in Word with Harbour

Postby Richard Chidiak » Thu May 30, 2013 8:41 am

Maurizio

Same for accented characters , looks like Harbour does not like them with OLE

Sending to Excel , same problem

I have on the top of my program
REQUEST HB_LANG_FR

and also HB_langSelect("FR")

but does not make a différence

Antonio any idea ?

this is a small sample

Code: Select all  Expand view

   TRY
       oExcel := CREATEOBJECT( "Excel.Application" )
    CATCH
       MSGSTOP("L'Application Microsoft Excel n'est pas installée sur cet Ordinateur !" )
       RETURN NIL
   END

   oBook  := oExcel:WorkBooks:Add()
   oSheet := oBook:Worksheets(1)

   nLine := 1
 
   oSheet:Cells( nLine, 1 ):Value = "Désignation"
    oSheet:Cells( nLine,2 ):Value = "Quantité"

   oExcel:Visible := .T.

   oexcel := nil

 


Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Euro sign in Word with Harbour Solved

Postby Maurizio » Thu May 30, 2013 9:31 am

Hello Richard


request HB_CODEPAGE_ITWIN
set( _SET_CODEPAGE, "ITWIN" )

Regards Maurizio
www.nipeservice.com
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: Euro sign in Word with Harbour

Postby Silvio.Falconi » Thu May 30, 2013 10:07 am

thereis an code
do you tried with #DEFINE EURO CHR(128)

(Alt + 128 is the symbol of euro )

on Print
oPrn:CmSay( x,y,Transform( Factura->Total,"@E 999,999.99" ) + Space(1) + Chr(128),oFont )

it coul be
oText:TypeText( chr(128) + "123.00")

to control make
#include "Fivewin.ch"
FUNCTION MAIN()

? ISOEM( CHR( 128 ) )
? ISANSI( CHR( 128 ) )

RETURN NIL

and remade these function
Code: Select all  Expand view
   CLIPPER ISANSI( PARAMS )         // cString    --> lAnsi
    {
       LPBYTE pString = ( LPBYTE ) _parc( 1 );
       WORD  w = 0, wLen = _parclen( 1 );
       BOOL  bAnsi = FALSE;

       while( w < wLen && ! bAnsi )
       {
          bAnsi = ( pString[ w ] >= 224 && pString[ w ] <= 255 ) || pString[ w ] == 128;
          w++;
       }

       _retl( bAnsi );
    }

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

    CLIPPER ISOEM( PARAMS )         // cString    --> lOem
    {
       LPBYTE pString = ( LPBYTE ) _parc( 1 );
       WORD  w = 0, wLen = _parclen( 1 );
       BOOL  bOem = FALSE;

       while( w < wLen && ! bOem )
       {
          bOem = pString[ w ] > 128 && pString[ w ] <= 168;
          w++;
       }

       _retl( bOem );
    }
 
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Euro sign in Word with Harbour Solved

Postby Richard Chidiak » Thu May 30, 2013 10:25 am

Maurizio

Perfect ,

Thank you

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 96 guests