FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to type Norway Language (Norwegian) in FWH?
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
How to type Norway Language (Norwegian) in FWH?
Posted: Thu Sep 09, 2010 07:00 PM

My customer need to use Norwegian for his client name but I don't know how to use it in FWH?

Any help are appreciated.

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: How to type Norway Language (Norwegian) in FWH?
Posted: Thu Sep 09, 2010 08:17 PM
Hello Dutch,
I think, that You know the typing of the Name.
You can use CHR( ... ) + CHR( ... ) // select Value of Character from Table :



=>>>>> http://www.lookuptables.com

http://www.asciitable.com

Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How to type Norway Language (Norwegian) in FWH?
Posted: Thu Sep 09, 2010 08:52 PM

Dear Uwe,

I mean the user need to type keyboard (Norwegian) through my program (TGET, TMULTIGET). When user type in MS Word, it works fine with Norwegian character but in my program has shown different character and save different also.

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: How to type Norway Language (Norwegian) in FWH?
Posted: Thu Sep 09, 2010 11:40 PM

Dutch,

FW doesn't support Unicode yet.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How to type Norway Language (Norwegian) in FWH?
Posted: Fri Sep 10, 2010 02:22 AM

Dear James,

How does I check, which font is a unicode?

Thanks in advance,

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 95
Joined: Fri Nov 23, 2007 04:43 AM
Re: How to type Norway Language (Norwegian) in FWH?
Posted: Fri Sep 10, 2010 12:30 PM
dutch wrote:Dear Uwe,

I mean the user need to type keyboard (Norwegian) through my program (TGET, TMULTIGET). When user type in MS Word, it works fine with Norwegian character but in my program has shown different character and save different also.


Do you use local Norwegian font in your application?

We have in Poland national characters too so in my application I have to use font from Central Europe (Arial CE instead Arial)

DEFINE FONT oFNTSYSNOR NAME "ARIAL CE" SIZE 8,16
Robert Frank
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: How to type Norway Language (Norwegian) in FWH?
Posted: Fri Sep 10, 2010 02:26 PM
Robert
Do you use local Norwegian font in your application?

I create my own Fonts with any Symbols I need.
I use Standard "Arial", change ( redraw ) the needed Chars to any exotic Symbol I like,
or create new ones and save / install the working Font as new Font.
Another Solution : copy a existing symbol of a foreign Font and replace
the needed Symbol inside my Font I'm working on.
It works perfect with FWH using : Get, Say, Button...

Example a GET-Field with Norwegian extra Symbols :


Download Fonttest :
Install and Define. Have a look at the changes ( repainted ) of : A a, E, e, O, o
http://www.pflegeplus.com/fw_downloads/arialnew.ttf

Dutch, I can send You a modified "Arial.ttf", Just tell me the Chars You want to change.
( like in my Example )
It takes only a few Minutes.

Test with MS-Fontmanager :

oNorway := TFont():New( "ArialNew", 0, 20,.F.,.F., 0, 0, 0,.F.,.F.)
REDEFINE GET oGet4 VAR cTEXTFONT2 ID 540 OF oDlg FONT oNorway UPDATE



Best regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How to type Norway Language (Norwegian) in FWH?
Posted: Fri Sep 10, 2010 11:09 PM

Dear Uwe,

First of all, Thank you very much for your (alway) kindness help.

Is it possible to switch from Norwegian to English in FW application? Normal I use a keyboard switch between English and other language.

I test the define below with your "ArialNew", it is good looking (I don't know Norwegian language).

If I below define, can I still change the keyboard to normal English.
oNorway := TFont():New( "ArialNew", 0, 20,.F.,.F., 0, 0, 0,.F.,.F.)
REDEFINE GET oGet4 VAR cTEXTFONT2 ID 540 OF oDlg FONT oNorway UPDATE

Thank you in advance,

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: How to type Norway Language (Norwegian) in FWH?
Posted: Sat Sep 11, 2010 01:09 AM
Hello Dutch,

Your Fontswitcher :
You can ask Your Customers for the new Symbols he needs and the Place, he wants them on Keyboard.
I will fix the "Arial" or any other Font for You ( new Norway Font )
Just click the Button, to change the Language.





The Flags ( right Mouseclick for save )




Code (fw): Select all Collapse
#include "FiveWin.ch"

STATIC oNorwEngl, lEnglNorway, c_path

FUNCTION MAIN()
LOCAL oDlg, oGet, oBtn1, oBtn2, oButtFont
LOCAL cLanguage := "English Oo Ee Aa"

c_path := CURDRIVE() + ":\" + GETCURDIR() 
oNorwEngl := TFont():New( "Arial", 0, 20,.F.,.F.,  0,  0,  0,.F.,.F.)
oButtFont := TFont():New("Arial",0,-16,.F.,.T.,0,0,0,.T. )
lEnglNorway := .F.

DEFINE DIALOG oDlg FROM 50, 50 TO 400, 600  PIXEL TITLE "Font-Switcher"

@ 10, 20 GET oGet VAR cLanguage OF oDlg SIZE 100, 20 PIXEL COLOR "+W/B" PICTURE "XXXXXXXXXXXXXXX" ;
FONT oNorwEngl UPDATE

@ 90, 40 BTNBMP oBtn1 SIZE 120, 40 OF oDlg  2007 ;
FILENAME c_path + "\Images\Great_britain.bmp" ;
LEFT ;
PROMPT "  &English / Norway  " ;
FONT oButtFont ;
ACTION ( DeleteObject(oNorwEngl), ; 
   IIF( lEnglNorway = .F., ; // Engl.
       ( lEnglNorway := .T., ;
         cLanguage := "Norway Oo Ee Aa", ;
         oNorwEngl := TFont():New( "ArialNew", 0, 20,.F.,.F.,  0,  0,  0,.F.,.F.), ; // Norway
         oBtn1:SetFile( c_path + "\Images\Norway.bmp" ) ), ;
       ( lEnglNorway := .F., ;
         cLanguage := "English Oo Ee Aa", ;
         oNorwEngl := TFont():New( "Arial", 0, 20,.F.,.F.,  0,  0,  0,.F.,.F.), ; // Engl.
         oBtn1:SetFile( c_path + "\Images\Great_Britain.bmp" ) ) ), ;
         oGet:SetFont( oNorwEngl ), oGet:Refresh() )
oBtn1:cToolTip =  { "Language-Switch", "English / Norway", 1, CLR_BLACK, 14089979 } 

@ 90, 170 BTNBMP oBtn2 SIZE 80, 40 OF oDlg  2007 ;
FILENAME c_path + "\Images\Exit.bmp" ;
LEFT ;
PROMPT "  &Exit  " ;
FONT oProgFont ;
ACTION ( oDlg:End() )

oBtn2:cToolTip =  { "Exit", "Language-Switch", 1, CLR_BLACK, 14089979 } 

ACTIVATE DIALOG oDlg CENTERED

oButtFont:End()
oNorwEngl:End() 

RETURN( NIL )


Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How to type Norway Language (Norwegian) in FWH?
Posted: Sun Sep 12, 2010 08:45 AM

Dear Uwe,

Thanks for your kindness help, I got your idea and it is the good choice.
Is the "Arialnew.ttf" is fully support Norwegian?
If not, may I have an Norwegian Font File?

If will try and let you know.

Thank you very much.

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: How to type Norway Language (Norwegian) in FWH?
Posted: Sun Sep 12, 2010 10:28 AM
Dear Dutch,

here are some useful informations for You.
I think my Solution will work :
replacing selected Chars from Keyboard-Layout with other Symbols with the Fontpainter.
Switching the Font, will display another Symbol.
The Keyboard-Layout shows different Symbols for : Ää Öö Üü

I created a new "Arial" named "Norwegian.ttf" with these Changes.
( works perfect with a GET, like You can see )
More Characters can be changed if needed.

Download :
http://www.pflegeplus.com/fw_download/norwegian.ttf

Lets have a look at the Keyboad-Layout :



Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How to type Norway Language (Norwegian) in FWH?
Posted: Mon Sep 13, 2010 01:35 AM
Dear Uwe,

Norwegian.ttf has not FONT as above Keyboard Layout, it show as normal English Font.
Have I need to install Norwegian Keyboard Layout?


Thank you so much, I will try and let you know the result. It will be great for another language (true type) solution too, if it works.
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How to type Norway Language (Norwegian) in FWH?
Posted: Mon Sep 13, 2010 03:01 AM

Dear Uwe,

I've got the problem now, the big problem is WindowsXP.Manifest.
I've used your font in an example, it works great.
It doesn't work when I've used in my application. Then I try to find the problem and got it. The problem will be solved after exclude WindowsXP.Manifest.

How can I use Norwegian FONT with WindowsXP.Manifest?

Thank you very much for your kindness help.

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to type Norway Language (Norwegian) in FWH?
Posted: Mon Sep 13, 2010 05:48 AM
Dutch,

This Microsoft document explains the Manifest file contents:

http://msdn.microsoft.com/en-us/library/aa374191(VS.85).aspx

I don't know how to specify the Norwegian code (there is a "language" field) but I guess this is the start point to review.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: How to type Norway Language (Norwegian) in FWH?
Posted: Mon Sep 13, 2010 12:32 PM
To use WindowsXP.Manifest with BORLAND, I changed something for sample :
< FWH\samples\testget6.prg >, like James suggested.
Maybe more changes needed using Borland ?
I replaced in Standard "Arial.ttf" the original Chars : Ää. Öö and Üü.
No ALT- or STRG-Combinations are used.



1. Changed WindowsXP.Manifest to => WindowsXP.Man ( to get it accepted from Borland )
2. Added in Line : IF EXIST %1.rc %bcdir%\bin\brc32 -r -d__FLAT__ %1 in Makefile

Sample : Testget6.prg
#include "FiveWin.ch"

function Main()
local oDlg, oFind, oBtn
local cFind1 := space( 100 ), cFind2 := space( 100 )
local nDir := 1
local lCase := .t., lWord := .f.

oNormal := TFont():New( "Arial", 0, 20,.F.,.F., 0, 0, 0,.F.,.F.)
oNorway := TFont():New( "Norwegian", 0, 20,.F.,.F., 0, 0, 0,.F.,.F.)
DEFINE DIALOG oDlg RESOURCE "Test"

REDEFINE GET oFind VAR cFind1 ID 101 OF oDlg FONT oNormal
REDEFINE GET oFind VAR cFind ID 102 OF oDlg FONT oNorway

oFind:bPostKey := { |x,y| if( empty( y ), oBtn:Disable(), oBtn:Enable() ) }
REDEFINE RADIO nDir ID 103, 104 OF oDlg
REDEFINE CHECKBOX lCase ID 105 OF oDlg
REDEFINE CHECKBOX lWord ID 106 OF oDlg
REDEFINE BUTTON oBtn ID 201 ACTION MsgInfo( "Ok" )
REDEFINE BUTTON ID 202 ACTION oDlg:End()

oDlg:bStart := { || oBtn:Disable() }

ACTIVATE DIALOG oDlg CENTERED

oNormal:End()
oNorway:End()

return nil


The Resource :

#include "..\include\winapi.ch"

#ifdef __FLAT__
1 24 "WindowsXP.Man"
#endif

#ifdef __64__
1 24 "WindowsXP64.Man"
#endif


Test DIALOG 34, 57, 432, 140
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Buscar"
FONT 8, "Tahoma"
{
GROUPBOX "", -1, 10, 6, 336, 124, BS_GROUPBOX | WS_GROUP
LTEXT "&Buscar:", -1, 20, 15, 26, 9
EDITTEXT 101, 21, 27, 316, 23
EDITTEXT 102, 21, 53, 316, 23
GROUPBOX "&Dirección:", -1, 21, 86, 74, 37, BS_GROUPBOX | WS_GROUP
CONTROL "Hacia &delante", 103, "BUTTON", BS_AUTORADIOBUTTON | WS_TABSTOP, 30, 97, 56, 9
CONTROL "Hacia &atrás", 104, "BUTTON", BS_AUTORADIOBUTTON | WS_TABSTOP, 30, 108, 56, 9
CHECKBOX "Coincidir &mayúsculas y minúsculas", 105, 104, 97, 120, 9, BS_AUTOCHECKBOX | WS_TABSTOP
CHECKBOX "&Palabras completas", 106, 104, 108, 120, 9, BS_AUTOCHECKBOX | WS_TABSTOP
DEFPUSHBUTTON "Buscar &siguiente", 201, 355, 53, 62, 15
PUSHBUTTON "&Cancelar", 202, 355, 75, 62, 15

Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.

Continue the discussion