FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Picture "@!" (upper case) problems
Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
Picture "@!" (upper case) problems
Posted: Mon Dec 04, 2006 06:32 PM

Hi all.

In my greek language programs, I am using the font
COURIER NEW GREEK.
There is no problem in display a GET variable if characters are in English language, when I use PICTURE "@!". Everything is in upper case.

If I use extended keyboard characters, e.g. ASCII Chr(129), I do not get the correct character.... I get something that I cannot read, or sometimes (with certain Chr(), I get something that is not even shown.
Same applies, if I type something in "EL" language.

This does not happen if I remove the clause PICTURE "@!" from the GET.
In this case, all the characters are shown correctly, in the same font and they are absolutely readable.

Please let me know if there is any solution to this problem, preferable, where to find the source code for this modification to upper case, when we use PICTURE "@!"

Thanks to all converned...

ps. I wonder if anyone else (non-english), has the same problem with their national language characters.

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Picture "@!" (upper case) problems
Posted: Mon Dec 04, 2006 06:55 PM
Ed,

I don't work with non-English languages, but here is where the "@!" picture is processed. In TGET.PRG look at Method keyChar() and you will find this code:

   if ! Empty( ::cPicture ) .and. '@!' $ ::cPicture
      nKey = Asc( Upper( Chr( nKey ) ) )
   endif


You could create a simple test program to see if it is converting your characters properly.

Regards,
James

P.S. Say Hi to Chris for me.
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
Picture "@!" (upper case) problems
Posted: Mon Dec 04, 2006 09:17 PM
James Bott wrote:Ed,

I don't work with non-English languages, but here is where the "@!" picture is processed. In TGET.PRG look at Method keyChar() and you will find this code:

   if ! Empty( ::cPicture ) .and. '@!' $ ::cPicture
      nKey = Asc( Upper( Chr( nKey ) ) )
   endif


You could create a simple test program to see if it is converting your characters properly.

Regards,
James

P.S. Say Hi to Chris for me.


James,

Thanks for the reply!

My name is not Ed, of course, but this is Ok... :-)

I knew about the above UPPER conversion a long time ago, and had already changed this as follows (in TGET.PRG)

   if ! Empty( ::cPicture ) .and. '@!' $ ::cPicture
      if Chr(nKey) $ 'abcdefghijklmnopqrstuvwxyz'
         nKey = Asc( Upper( Chr( nKey ) ) )
      endif
   endif


Following down the code, I have tracked the error...

It is in TRANSFORM() where the error is done... and unfortunately, I don't have the code for this function :-)

I believe that the FWH/XHARBOUR gurus could probably tell me, why this is happening.???

For example, I input the character Chr(229), and the function TRANSFORM() returns Chr(GodKnowsWhat), which has nothing to do with the inputed character 229.

Any help for the big guys will be welcome...

ps. No problem with the basic english (latin) characters...
Problems start with characters after Chr(128)
(The Chr(128) is an upper case "A" in the greek language)

Thanks to all and of course I'm waiting...

Regards to all
Evans
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Picture "@!" (upper case) problems
Posted: Mon Dec 04, 2006 10:53 PM

Evans,

>It is in TRANSFORM() where the error is done... and unfortunately, I don't have the code for this function.

I remember there was a problem with this function--it seems like it was about a year ago. I posted the problem and it was fixed. However, the fixed version may still not have fixed your Greek language problem. Are you using a recent version of (x)Harbour (less than a year old)?

I suggest posting a message on the xHarbour newsgroup (news.xHarbour.org).

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion