EControl Ltd. Forum Index EControl Ltd.
VCL libraries and software support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Character input problem in SyntaxMemo, Delphi 2009

 
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor
View previous topic :: View next topic  
Author Message
tranglos



Joined: 12 Dec 2007
Posts: 12
Location: Poland

PostPosted: Wed Jan 28, 2009 5:08 pm    Post subject: Character input problem in SyntaxMemo, Delphi 2009 Reply with quote

(I've sent this by email, but if you prefer, please respond in the forum. The email message had two small screenshots; I don't think I can attach them here.)

I have just upgraded your fantastic SyntaxMemo to version 2.60, for Delphi 2009. After installing the component, I've found that the editor no longer accepts Polish diacritic characters typed in.

These characters are obtained by pressing AltGr (right Alt) and a letter key. In Delphi 2009 pressing these keys doesn't insert any character into the memo (i.e., there is no reaction).

The problem occurs in all the demo projects compiled in Delphi 2009, as well as in a simplest possible test (just drop the SyntaxMemo component on a form). The problem does NOT occur when building the demos in Delphi 2007.

Changing the font or the Charset property does not eliminate the problem.

The problem is also present in the TSyntMemoStrings editor (in the Delphi designer).

This is somewhat urgent, because without the ability to type in Polish I cannot use the component at all in Delphi 2009. Please let me know if you need any further information about this problem.


A separate issue that affects only the Gutter Objects demo under Delphi 2007: When I try to type Polish diacritic characters, the memo inserts Russian characters instead (please see the screenshot.) This is the only demo that exhibits this issue. The problem does not occur in Delphi 2007 when dropping a new component on a form, but I am puzzled about why it happens with this particular demo, since SynaxMemo is set to DEFAULT_CHARSET, and I can't figure out what property might be responsible for translating characters in this way. (This is not particularly urgent, I'm just curious about why this happens).

Thanks a lot,
Marek
marek
Back to top
View user's profile Send private message Visit poster's website
econtrol
Site Admin


Joined: 09 Jun 2006
Posts: 202

PostPosted: Sun Feb 01, 2009 1:21 pm    Post subject: Reply with quote

Fix (ecSyntMemo.pas):
Code:
procedure TCustomSyntaxMemo.KeyPress(var Key: Char);
var WC: ecChar;
begin
  inherited;
  {$IFDEF EC_UNICODE}
    {$IFDEF EC_STRING_UNICODE}
    WC := Key;
    {$ELSE}
    if (Key = #63) and (FUniChar <> #0) then WC := FUniChar
     else WC := ecKeyChar(Key);
    FUniChar := #0;
    {$ENDIF}
  {$ELSE}
  WC := Key;
  {$ENDIF}
....


P.S. Registered users may request latest sources by e-mail at any time.

Michael.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group