FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Pocket PC National characters on display
Posts: 10
Joined: Fri Dec 14, 2007 12:54 PM
National characters on display
Posted: Fri Dec 14, 2007 03:57 PM

How to force Windows CE on Psion to display polish national characters?

function Main()

local oWnd, oFont

Request Hb_Lang_PLWIN
Request Hb_CodePage_PLWIN

Hb_LangSelect ('PLWIN')
Hb_SetCodePage ('PLWIN')

DEFINE FONT oFont NAME "times" SIZE 10, 18

DEFINE WINDOW oWnd TITLE "Tutor05"

@ 1, 2 SAY cmonth( date() ) FONT oFont

return

The names of month are on polish language but specific polish characters are replaced with Western language characters.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
National characters on display
Posted: Fri Dec 14, 2007 04:05 PM

Grzegorz,

> specific polish characters are replaced with Western language characters

Do those polish characters look fine in Pocket Word using the same font ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10
Joined: Fri Dec 14, 2007 12:54 PM
National characters on display
Posted: Mon Dec 17, 2007 09:25 AM
Antonio Linares wrote:Grzegorz,

> specific polish characters are replaced with Western language characters

Do those polish characters look fine in Pocket Word using the same font ?


No, this characters are the same like in FiveWin, Alt + 241 = 帽, instead of ń. Polish characters are displey only in names if months in system calendar.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
National characters on display
Posted: Mon Dec 17, 2007 10:06 AM

Have you properly configured your Pocket PC in Settings-System-Regional Settings-Region ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10
Joined: Fri Dec 14, 2007 12:54 PM
National characters on display
Posted: Mon Dec 17, 2007 10:37 AM
Antonio Linares wrote:Have you properly configured your Pocket PC in Settings-System-Regional Settings-Region ?


In Regional Settings Properties J have Polish in Your Locale but User Interface Language is not available ( is English ).
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
National characters on display
Posted: Mon Dec 17, 2007 11:09 AM

If Polish is not supported by Windows Mobile (it seems quite strange), then you may need to build your own function to properly translate your chars into the right ones:

TextToPolish( <cText> ) --> <cPolishText>

Unfortunately we don't know Polish so we can't help you there :-(
but its not a difficult function to build

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10
Joined: Fri Dec 14, 2007 12:54 PM
National characters on display
Posted: Mon Dec 17, 2007 01:58 PM
Antonio Linares wrote:If Polish is not supported by Windows Mobile (it seems quite strange), then you may need to build your own function to properly translate your chars into the right ones:

TextToPolish( <cText> ) --> <cPolishText>

Unfortunately we don't know Polish so we can't help you there :-)
but its not a difficult function to build


Problem isn't in translate characters to Polish but with display characters on screen.
I test font.prg ( from FWPPC\Source\Classes ) and it seems I can't change fonts. I change font in DEFAULT statment cFaceName.
TWindow() : New()
oF := TWindow() : GetFont()
oF:cFaceName always is MS San Serif
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
National characters on display
Posted: Mon Dec 17, 2007 02:58 PM

Please check in Pocket Word what fonts are availables

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10
Joined: Fri Dec 14, 2007 12:54 PM
National characters on display
Posted: Mon Dec 17, 2007 03:34 PM
Antonio Linares wrote:Please check in Pocket Word what fonts are availables

I have only WordPad. There are Times New Roman, Courier New, Symbol, Tahoma, Wingdings.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
National characters on display
Posted: Tue Dec 18, 2007 12:28 AM

Then you can only use those fonts unless you install more fonts on it.

Please review samples\Test2.prg to see how to manage fonts

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10
Joined: Fri Dec 14, 2007 12:54 PM
National characters on display
Posted: Tue Dec 18, 2007 08:59 AM
Antonio Linares wrote:Then you can only use those fonts unless you install more fonts on it.

Please review samples\Test2.prg to see how to manage fonts


I test this sample:

function Main()

local oWnd, oFont, cChar, oFont1, oFont2, oFont3, oFont4

Request Hb_Lang_PLWIN
Request Hb_CodePage_PLWIN

Hb_LangSelect ('PLWIN')
Hb_SetCodePage ('PLWIN')

DEFINE FONT oFont NAME "Verdana" SIZE 8, -12
DEFINE FONT oFont1 NAME "Courier New" SIZE 8, -12
DEFINE FONT oFont2 NAME "times" SIZE 8, -12
DEFINE FONT oFont3 NAME "Times New Roman" SIZE 8, -12
DEFINE FONT oFont4 NAME "Tahoma" SIZE 8, -12

oFont:nCharSet := 238 // change to East Europe char set
oFont1:nCharSet := 238 // seems to do nothing
oFont2:nCharSet := 238
oFont3:nCharSet := 238
oFont4:nCharSet := 238

DEFINE WINDOW oWnd
cChar := cmonth( date() )

@ 1, 1 SAY cCHar SIZE 234, 17 FONT oFont
@ 2, 1 say "ąćęłń贸śżź " FONT oFont
@ 3, 1 say str( len ( oFont:cFaceName ) )+' ' +oFont:cFaceName


@ 4, 1 SAY cCHar SIZE 234, 17 FONT oFont1
@ 5, 1 say "ąćęłń贸śżź " FONT oFont1
@ 6, 1 say str( len ( oFont1:cFaceName ) )+' ' +oFont1:cFaceName


@ 7, 1 SAY cCHar SIZE 234, 17 FONT oFont2
@ 8, 1 say "ąćęłń贸śżź " FONT oFont2
@ 9, 1 say str( len ( oFont2:cFaceName ) )+' ' +oFont2:cFaceName


@ 10, 1 SAY cCHar SIZE 234, 17 FONT oFont3
@ 11, 1 say "ąćęłń贸śżź " FONT oFont3
@ 12, 1 say str( len ( oFont3:cFaceName ) )+' ' +oFont3:cFaceName

@ 13, 1 SAY cCHar SIZE 234, 17 FONT oFont4
@ 14, 1 say "ąćęłń贸śżź " FONT oFont4
@ 15, 1 say str( len ( oFont4:cFaceName ) )+' ' +oFont4:cFaceName

ACTIVATE WINDOW oWnd

oFont:End()

return nil
Instead of Grudzień
ąćęłń贸śżź
Courier New
I have Grudzie帽
鹿忙锚鲁帽贸艙驴鸥
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
National characters on display
Posted: Tue Dec 18, 2007 09:24 AM
You can not do it this way:
DEFINE FONT oFont NAME "Verdana" SIZE 8, -12 
oFont:nCharSet := 238 // change to East Europe char set

instead, do it this way:
oFont = TFont():New( "Verdana", -12, 8,,,,,,,, 238 )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10
Joined: Fri Dec 14, 2007 12:54 PM
National characters on display
Posted: Tue Dec 18, 2007 09:47 AM
Antonio Linares wrote:You can not do it this way:
DEFINE FONT oFont NAME "Verdana" SIZE 8, -12 
oFont:nCharSet := 238 // change to East Europe char set

instead, do it this way:
oFont = TFont():New( "Verdana", -12, 8,,,,,,,, 238 )


I changed nHeight with nWidth ( 8 and -12 ) and tested it and no change in program behaviour.

function Main()

local oWnd, oFont, cChar, oFont1, oFont2, oFont3, oFont4

Request Hb_Lang_PLWIN
Request Hb_CodePage_PLWIN

Hb_LangSelect ('PLWIN')
Hb_SetCodePage ('PLWIN')

oFont = TFont():New( "Verdana", 8, -12, .f., , , , , , , ,238 )
oFont1 = TFont():New( "Courier New", 8, -12, .f., , , , , , , ,238 )
oFont2 = TFont():New( "times", 8, -12, .f., , , , , , , ,238 )
oFont3 = TFont():New( "Times New Roman", 8, -12, .f., , , , , , , ,238 )
oFont4 = TFont():New( "Tahoma", 8, -12, .f., , , , , , , ,238 )


DEFINE WINDOW oWnd
cChar := cmonth( date() )

@ 1, 1 SAY cCHar SIZE 234, 17 FONT oFont
@ 2, 1 say "ąćęłń贸śżź " FONT oFont
@ 3, 1 say str( len ( oFont:cFaceName ) )+' ' +oFont:cFaceName


@ 4, 1 SAY cCHar SIZE 234, 17 FONT oFont1
@ 5, 1 say "ąćęłń贸śżź " FONT oFont1
@ 6, 1 say str( len ( oFont1:cFaceName ) )+' ' +oFont1:cFaceName


@ 7, 1 SAY cCHar SIZE 234, 17 FONT oFont2
@ 8, 1 say "ąćęłń贸śżź " FONT oFont2
@ 9, 1 say str( len ( oFont2:cFaceName ) )+' ' +oFont2:cFaceName


@ 10, 1 SAY cCHar SIZE 234, 17 FONT oFont3
@ 11, 1 say "ąćęłń贸śżź " FONT oFont3
@ 12, 1 say str( len ( oFont3:cFaceName ) )+' ' +oFont3:cFaceName

@ 13, 1 SAY cCHar SIZE 234, 17 FONT oFont4
@ 14, 1 say "ąćęłń贸śżź " FONT oFont4
@ 15, 1 say str( len ( oFont4:cFaceName ) )+' ' +oFont4:cFaceName

ACTIVATE WINDOW oWnd

oFont:End()

return nil
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
National characters on display
Posted: Tue Dec 18, 2007 10:01 AM

Please try this:

oFont = TFont():New( "Verdana", 8, -12, .f., , , , , , , ,238 )
MsgInfo( oFont:nCharSet )

and check if it shows 238, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10
Joined: Fri Dec 14, 2007 12:54 PM
National characters on display
Posted: Tue Dec 18, 2007 11:00 AM
Antonio Linares wrote:Please try this:

oFont = TFont():New( "Verdana", 8, -12, .f., , , , , , , ,238 )
MsgInfo( oFont:nCharSet )

and check if it shows 238, thanks


For all five fonts it return 238 but on display is the same.