National characters on display

National characters on display

Postby Grzegorz » Fri Dec 14, 2007 3: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.
Grzegorz
 
Posts: 10
Joined: Fri Dec 14, 2007 12:54 pm

Postby Antonio Linares » Fri Dec 14, 2007 4: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Grzegorz » Mon Dec 17, 2007 9: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.
Grzegorz
 
Posts: 10
Joined: Fri Dec 14, 2007 12:54 pm

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Grzegorz » 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 ).
Grzegorz
 
Posts: 10
Joined: Fri Dec 14, 2007 12:54 pm

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Grzegorz » Mon Dec 17, 2007 1: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
Grzegorz
 
Posts: 10
Joined: Fri Dec 14, 2007 12:54 pm

Postby Antonio Linares » Mon Dec 17, 2007 2:58 pm

Please check in Pocket Word what fonts are availables
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Grzegorz » Mon Dec 17, 2007 3: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.
Grzegorz
 
Posts: 10
Joined: Fri Dec 14, 2007 12:54 pm

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Grzegorz » Tue Dec 18, 2007 8: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ñ
¹æê³ñ󜿟
Grzegorz
 
Posts: 10
Joined: Fri Dec 14, 2007 12:54 pm

Postby Antonio Linares » Tue Dec 18, 2007 9:24 am

You can not do it this way:
Code: Select all  Expand view  RUN
DEFINE FONT oFont NAME "Verdana" SIZE 8, -12
oFont:nCharSet := 238 // change to East Europe char set

instead, do it this way:
Code: Select all  Expand view  RUN
oFont = TFont():New( "Verdana", -12, 8,,,,,,,, 238 )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Grzegorz » Tue Dec 18, 2007 9:47 am

Antonio Linares wrote:You can not do it this way:
Code: Select all  Expand view  RUN
DEFINE FONT oFont NAME "Verdana" SIZE 8, -12
oFont:nCharSet := 238 // change to East Europe char set

instead, do it this way:
Code: Select all  Expand view  RUN
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
Grzegorz
 
Posts: 10
Joined: Fri Dec 14, 2007 12:54 pm

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Grzegorz » 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.
Grzegorz
 
Posts: 10
Joined: Fri Dec 14, 2007 12:54 pm

Next

Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 47 guests