FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour problem with polish chars in print
Posts: 357
Joined: Thu Nov 02, 2006 06:53 PM
problem with polish chars in print
Posted: Sat Nov 10, 2007 07:44 AM

in msginfo polish chars are ok

but in object print oPrn I don't have polish chars ( in view )

my source:

include "Fivewin.ch"

REQUEST HB_LANG_PL852
REQUEST HB_LANG_PLMAZ
REQUEST HB_LANG_PLISO
REQUEST HB_LANG_PLWIN
REQUEST HB_CODEPAGE_PLMAZ
REQUEST HB_CODEPAGE_PLISO
REQUEST HB_CODEPAGE_PL852
REQUEST HB_CODEPAGE_PLWIN

FUNCTION MAIN()

LOCAL oWnd, oMenu


   HB_LANGSELECT( "PLWIN" )
   HB_SETCODEPAGE( "PLWIN" )

// HB_SETKEYCP("PLMAZ",INIT_CP)
// HB_SETDISPCP(INIT_CP,'PLMAZ',.t.)

MENU oMenu
    MENUITEM "&Test"

    MENU
        MENUITEM "&Test1";
                 ACTION test1()
        MENUITEM "&Test2";
                 ACTION MSGINFO( "Test z języka polskiego (ąćęłń贸źżĄĆĘŁŃ脫ŹŻ)" )
    ENDMENU
ENDMENU

DEFINE WINDOW oWnd;
       MENU oMenu

ACTIVATE WINDOW oWnd ;
    ON INIT oWnd:Center()

function test1()
PRINT oPrn PREVIEW
PAGE
oPrn:Say( 2, 2, "Test z języka polskiego (ąćęłń贸źżĄĆĘŁŃ脫ŹŻ" )
ENDPAGE
ENDPRINT
return nil

best regards

kajot
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
problem with polish chars in print
Posted: Sat Nov 10, 2007 09:32 PM
You may need to implement a function of your own to properly convert the chars into the right ones:

oPrn:Say( 2, 2, FixText( "Test z języka polskiego (ąćęłń贸źżĄĆĘŁŃ脫ŹŻ" ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 357
Joined: Thu Nov 02, 2006 06:53 PM
problem with polish chars in print
Posted: Sun Nov 11, 2007 11:36 AM

where is the function FixText ?

best regards

kajot
Posts: 357
Joined: Thu Nov 02, 2006 06:53 PM
problem with polish chars in print
Posted: Sun Nov 11, 2007 11:43 AM

I looked formy mistake

function test1()
PRINT oPrn PREVIEW
DEFINE FONT oFnt NAME "Arial CE" SIZE 0, -10 OF oPrn
PAGE
oPrn:Say( 2, 2, "Test z języka polskiego (ąćęłń贸źżĄĆĘŁŃ脫ŹŻ)",oFnt )
ENDPAGE
ENDPRINT
return nil

best regards

kajot
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
problem with polish chars in print
Posted: Sun Nov 11, 2007 06:15 PM

Is it working fine now ?

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion