Picture "@!" (upper case) problems

Picture "@!" (upper case) problems

Postby E. Bartzokas » Mon Dec 04, 2006 6: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.
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Postby James Bott » Mon Dec 04, 2006 6: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:

Code: Select all  Expand view
   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.
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby E. Bartzokas » Mon Dec 04, 2006 9: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:

Code: Select all  Expand view
   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)

Code: Select all  Expand view
   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
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Postby James Bott » 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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 86 guests