Greek support in FW

Greek support in FW

Postby kronos911 » Fri Nov 11, 2005 4:38 pm

Is it posible to make FW understand Greek for the case changing string functions (e.g. UPPER(), LOWER(), @! and so on)? With DOS apps I just linked in NTXGR437.OBJ and they worked fine. When I link that OBJ or NTXGR851.OBJ well lets say the GETs are not a pritty picture when you type Greek text.
Is there an equivalent file for FW.
Thanks
kronos911
 
Posts: 37
Joined: Sat Oct 22, 2005 2:15 pm
Location: Greece

Postby dbSoft » Sat Nov 12, 2005 7:31 am

Code: Select all  Expand view  RUN
--------------------------
font.prg       /////   nCharSet := 161 greece
--------------------------

DEFAULT cFaceName := "SYSTEM_FONT", nEscapement := 0, nOrientation := 0, nWeight := 0,;
           nHeight := 14, lItalic := .f., lFromUser := .f., lUnderLine := .f.,;
           lStrikeOut := .f., nCharSet := 161 , nOutPrecision := 0,;
           nClipPrecision := 0, nQuality := 0, lBold := .f., nWidth := 0,;
           nPitchFamily := 0, ::nCount := 0, ::lDestroy := .t., ::aFonts := {}






User avatar
dbSoft
 
Posts: 16
Joined: Thu Oct 13, 2005 8:31 pm
Location: Greece

Postby kronos911 » Sat Nov 12, 2005 1:24 pm

The problem is no showing Greek text but using the PICTURE clauses of a GET, the UPPER() and LOWER() functions. For example try this

Code: Select all  Expand view  RUN
DEFINE oMainFont NAME “Arial Greek” SIZE 0,-12

cText1 := SPACE(60)

DEFINE DIALOG oFindDlg;
FROM 4,10 TO 15,65;
FONT oMainFont;
TITLE OemToAnsi("Υπερ-Αναζητηση");
OF oBrwsWin COLOR CLR_BLACK, CLR_HGRAY

  @ 1.3, 1 GET cText1 PICTURE "@!" OF oFindDlg SIZE 200,10

  @2   , 25 BUTTON OemToAnsi("Ενταξει") SIZE 60,16 OF oFindDlg
  @3.2, 25 BUTTON OemToAnsi("Aκυρο")   SIZE 60,16 OF oFindDlg ACTION oFindDlg:End()

ATIVATE DIALOG oFindDlg CENTER


Link that with the stanord FW4Clipper libs and run it. Then relink it with stha same libs and NTXGR437.OBJ and see what happens.
kronos911
 
Posts: 37
Joined: Sat Oct 22, 2005 2:15 pm
Location: Greece

Postby dbSoft » Sat Nov 12, 2005 5:13 pm

ΤΟ UPPER(), LOWER(), ΤΟ ΤΣΕΚΑΡΗΣ ΣΤΙΣ ΙΔΙΟΤΗΤΕΣ
ΤΟΥ ΠΕΔΙΟΥ ΤΗΣ ΦΟΡΜΑΣ ΑΝ ΚΑΝΕΙΣ ΤΟ DLL ME TO WorkShop

ΔΙΑΦΟΡΕΤΙΚΑ ΔΙΛΩΝΕΙΣ ΣΤΟ RC ΑΡΧΕΙΟ ES_UPPERCASE

PROMHTH DIALOG LOADONCALL MOVEABLE DISCARDABLE 6, 15, 405, 278
STYLE WS_CHILD | WS_VISIBLE | WS_DLGFRAME | WS_THICKFRAME | WS_MINIMIZEBOX
FONT 8, "Arial"
{
EDITTEXT 110, 108, 22, 47, 10
EDITTEXT 111, 108, 43, 139, 10, ES_UPPERCASE | WS_BORDER | WS_TABSTOP
EDITTEXT 112, 108, 61, 139, 10

ΦΙΛΙΚΑ ΓΙΑΝΝΗΣ
User avatar
dbSoft
 
Posts: 16
Joined: Thu Oct 13, 2005 8:31 pm
Location: Greece

Postby kronos911 » Sat Nov 12, 2005 7:52 pm

Well try this and tell me how to make it work
Code: Select all  Expand view  RUN
cText1 := "Κατι" // from a get statement with a "@!" picture clause that doesn't work

cSearch := UPPER(cText)+cYear+cEmploee  // Upper doesn't work eather
SEEK cSearch
IF FOUND()
  // do something
ELSE
  MSGAlert("Nothing was found", "Search") // In FW4Clipper this comes up all the time unless you type caps.
ENDIF


How can I make FW4Clipper understand greek text. Is there a NTXGR437.OBJ file for FW (national clipper system)
kronos911
 
Posts: 37
Joined: Sat Oct 22, 2005 2:15 pm
Location: Greece

Postby Antonio Linares » Mon Nov 14, 2005 8:42 am

Kronos,

I don't know if there is greek support for Clipper. I guess yes.

Anyhow, Harbour and FWH do support greek.
regards, saludos

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

Postby kronos911 » Mon Nov 14, 2005 8:26 pm

Yes Clipper dose support Greek on a DOS level.
As for FWH/xH let me port my app to FW first and then see about them
kronos911
 
Posts: 37
Joined: Sat Oct 22, 2005 2:15 pm
Location: Greece

Conversion of greek characters to Upper Case

Postby E. Bartzokas » Mon Nov 05, 2007 4:09 pm

I have made my own function to do this job called GR_UPPER(cString)
which does the conversion, including accented characters (e.g. our
greek language "i" and "I".
It does not cooperate with the PICTURE clause (I never tried that)
but it works fine before saving GET's.

If you are intersted I can send by private email to anyone interested.
Please notice that it's still in 16 bit (OBJ is compiled with C 6.00)

Perhaps someone could re-compile this in xHarbour so we could use
it with xHarbour too.

Regards to all
Evans
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Re: Conversion of greek characters to Upper Case

Postby E. Bartzokas » Mon Nov 05, 2007 5:27 pm

I have made a modification in both TGET.PRG for FW and FWH.

Now greek users can use this clause
REDEFINE GET oget VAR cGet Picture "@g" ID 1001 OF oDlg
etc.

The old picture "@!", still works, but only for upper case english characters,
in the "@g" picture, it converts both english and greek characters to upper
case.

I hereby paste the code changed in TGET.PRG (it works for both 16 bit and 32 bit)
You'd need to include TGET.PRG in your programs, but have to modify
the METHOD KeyChar( nKey, nFlags ) CLASS TGet as follows:

Code: Select all  Expand view  RUN
METHOD KeyChar( nKey, nFlags ) CLASS TGet

   local nHi, nLo
   local lAccept
   local bKeyAction := SetKey( nKey )
   local nDefButton
   local n, xKey                                       // added this local variable 11/sep/2006 V.


   if ! Empty( ::cPicture ) .and. '@!' $ ::cPicture
      xKey := Chr(nKey)
      if xKey $ "abcdefghijklmnopqrstuvwxyz"    // added this if - endif 11/sep/2006 V.
         xKey := Upper( xKey )
         nKey := Asc(xKey)
      endif xKey $ "abcdefghijklmnopqrstuvwxyz"    // added this if - endif 11/sep/2006 V.
   endif

  if ! Empty( ::cPicture ) .and. Upper('@g') $ Upper(::cPicture)
      * Translate to upper case - English characters first!
      xKey := Chr(nKey)
      if xKey $ "abcdefghijklmnopqrstuvwxyz"    // added this if - endif 11/sep/2006 V.
         xKey := Upper( xKey )
         nKey := Asc(xKey)
      endif xKey $ "abcdefghijklmnopqrstuvwxyz"    // added this if - endif 11/sep/2006 V.
      * Translate to upper case - Greek characters now!
      xKey := Chr(nKey)
      if xKey $ "αάβγδεέζηήθιίϊκλμνξοόπρσςτυύϋφχψωώ"    // added this if - endif 11/sep/2006 V.
         n := At(xKey, "αάβγδεέζηήθιίϊκλμνξοόπρσςτυύϋφχψωώ")
         xKey := Subs("ΑΆΒΓΔΕΈΖΗΉΘΙΊΪΚΛΜΝΞΟΌΠΡΣΣΤΥΎΫΦΧΨΩΏ", n, 1)
         nKey := Asc(xKey)
     endif xKey $ "αάβγδεέζηήθιίϊκλμνξοόπρσςτυύϋφχψωώ"    // added this if - endif 11/sep/2006 V.
   endif


   if bKeyAction != nil .and. lAnd( nFlags, 16777216 ) // function Key
      Eval( bKeyAction, ProcName( 4 ), ProcLine( 4 ), Self )
      return 0         // Already processed, API do nothing
   endif


1. The code from if bKeyAction..... and below remains unchanged
2. If someone wants the code exactly as it should be, I can submit my own TGET.PRG's (16 bit and 32 bits)

I believe that this is a better solution than the function GR_UPPER() above.

Kind regards to all

Evans
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Postby Antonio Linares » Mon Nov 05, 2007 6:09 pm

Evans,

Thanks!
regards, saludos

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


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 5 guests