View Issue Details

IDProjectCategoryView StatusLast Update
0013140LazarusIDEpublic2018-05-12 20:00
ReporterSaeka-jp Assigned ToMartin Friebe  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.9.26 
Target Version1.0.0Fixed in Version0.9.31 (SVN) 
Summary0013140: Cannot input Japanese character correctly in IDE( SynEdit )
DescriptionWe use IME(Input Method Editor) when input Japanese character.
And we cannot input on Lazarus IDE correctry, for now.

( What about IME? http://en.wikipedia.org/wiki/Input_method )

This is not only issue for Japanese character, but also Chinese, Korean, etc..( almost Far East Asia Language )

TagsNo tags attached.
Fixed in Revision
LazTarget1.0
WidgetsetWin32/Win64
Attached Files

Relationships

related to 0011819 closedMartin Friebe SynEdit overlaps double width characters 
related to 0021450 closedMartin Friebe WM_IME_* (e.g WM_IME_NOTIFY) are not delivered to components 

Activities

Dmitry Boyarintsev

2009-02-09 14:53

developer   ~0025225

Saeka, what does actually happen?
Are there any rubbish-chars appearing at the SynEdit?

do have any information on Eastern languages support for other OSes, like Linux or Mac OS X.

Saeka-jp

2009-02-09 15:16

reporter   ~0025226

Thanks, Could you see snapshot fixjp.pdf 0011819 FixJp09261.zip?

Under Windows, input character is correct, but IME input editor show at incorrect position and incorrect font size.

About other OS(Linux,BSD) information.
http://en.wikipedia.org/wiki/Immodule
http://www.scim-im.org/projects

It seems to be happen in Mac OS X too, but I don't have any information for now.

2009-02-11 10:17

 

imm.pp (29,961 bytes)

Saeka-jp

2009-02-11 10:18

reporter   ~0025263

Last edited: 2009-02-11 10:20

Imm.pp is missing in current lazarus?
This is needed when using IME-API on only Windows.

Or Imm.pp was renamed ?

(attached imm.pp)

2009-02-19 16:48

 

synedit_pp_18762.patch (2,044 bytes)   
Index: synedit.pp
===================================================================
--- synedit.pp	(revision 18763)
+++ synedit.pp	(working copy)
@@ -65,6 +65,10 @@
   {$IFDEF USE_UTF8BIDI_LCL}
   FreeBIDI, utf8bidi,
   {$ENDIF}
+{ #FIX-JP ADD >>}
+  Imm,
+{ << FIX-JP }
+
   Types, FPCAdds, LCLIntf, LCLType, LMessages, LCLProc,
 {$ELSE}
   Windows,
@@ -296,10 +300,15 @@
     procedure WMEraseBkgnd(var Msg: TMessage); message WM_ERASEBKGND;
     procedure WMGetDlgCode(var Msg: TWMGetDlgCode); message WM_GETDLGCODE;
     procedure WMHScroll(var Msg: {$IFDEF SYN_LAZARUS}TLMScroll{$ELSE}TWMScroll{$ENDIF}); message WM_HSCROLL;
-{$IFDEF SYN_MBCSSUPPORT}
+
+{ #FIX-JP ADD >>}
+    fImeCount: Integer;
+{ << FIX-JP }
+
+//{$IFDEF SYN_MBCSSUPPORT}
     procedure WMImeComposition(var Msg: TMessage); message WM_IME_COMPOSITION;
     procedure WMImeNotify(var Msg: TMessage); message WM_IME_NOTIFY;
-{$ENDIF}
+//{$ENDIF}
     procedure WMKillFocus(var Msg: TWMKillFocus); message WM_KILLFOCUS;
     {$IFDEF SYN_LAZARUS}
     procedure WMExit(var Message: TLMExit); message LM_EXIT;
@@ -1894,7 +1903,7 @@
   end;
 end;
 
-{$IFDEF SYN_MBCSSUPPORT}
+//{$IFDEF SYN_MBCSSUPPORT}
 procedure TCustomSynEdit.WMImeComposition(var Msg: TMessage);
 var
   imc: HIMC;
@@ -1940,8 +1949,9 @@
   end;
   inherited;
 end;
-{$ENDIF}
+//{$ENDIF}
 
+
 procedure TCustomSynEdit.IncPaintLock;
 begin
   inc(fPaintLock);
@@ -3851,9 +3861,9 @@
 procedure TCustomSynEdit.UpdateCaret;
 var
   CX, CY: Integer;
-{$IFDEF SYN_MBCSSUPPORT}
+//{$IFDEF SYN_MBCSSUPPORT}
   cf: TCompositionForm;
-{$ENDIF}
+//{$ENDIF}
 begin
   if (PaintLock <> 0)
   {$IFDEF SYN_LAZARUS}
@@ -3884,13 +3894,13 @@
       HideCaret;
       SetCaretPosEx(Handle ,CX + FCaretOffset.X, CY + FCaretOffset.Y);
     end;
-{$IFDEF SYN_MBCSSUPPORT}
+//{$IFDEF SYN_MBCSSUPPORT}
     if HandleAllocated then begin
       cf.dwStyle := CFS_POINT;
       cf.ptCurrentPos := Point(CX, CY);
       ImmSetCompositionWindow(ImmGetContext(Handle), @cf);
     end;
-{$ENDIF}
+//{$ENDIF}
   end;
 end;
 
synedit_pp_18762.patch (2,044 bytes)   

Saeka-jp

2009-02-19 16:54

reporter   ~0025582

We can input Japanese Characters correctly by this patch + imm.pp on Windows.
This patch is available to newest svn today, (18762) , only windows.

Martin Friebe

2009-02-19 17:32

manager   ~0025583

@Saeka: Can you tell me the last version of FPC or Lazarus (which one) that contained imm.pp?

I need to be sure it wasn't removed for some reason (like copyright / clean room)

Saeka-jp

2009-02-21 00:35

reporter   ~0025603

Last edited: 2009-02-21 00:38

Attached imm.pp was downloaded some years ago, with graphics components for FreePascal.
It seems to be a part of RTL of FPC (according to comment of it), but current lazarus or FPC is not include it.
For instance, In WinCE, the same functions header of IME is included in. ( WinCE directory, coredll.inc )

It is only dll-header. If is there any probrem, shall I recreate it in clean room ?

Martin Friebe

2009-02-23 00:50

manager   ~0025646

I'll have to find out myself what the best way is to get the file added (imm.pp) I only joined lazarus a short while back.

best is to go to the fpc mailing list (I did a quick post, see the answer at http://lists.freepascal.org/lists/fpc-devel/2009-February/016375.html ).

You may ask the FPC team yourself, what the best way is.
(Sorry not to be of more help at the moment, simply not enough time...)

Saeka-jp

2009-02-23 22:16

reporter   ~0025691

@Martin
Thank you very much.

Vincent Snijders

2010-12-28 14:14

manager   ~0044653

Dmitry created an imm unit, which can be found at in the fpc packages:
packages\winunits-base\src\imm.pas

Zeljan Rikalo

2012-02-11 20:01

developer   ~0056759

@Martin, what about this one ?

Martin Friebe

2012-02-13 01:58

manager   ~0056787

Last edited: 2012-03-11 01:45

Anyone wanting to try:
compile with WinIME defined. Very basic, only sets the position of the IME editor, nothing else. But at least it isn't in the corner of the screen.

EDIT: no define needed, anymore

Martin Friebe

2012-03-17 23:40

manager   ~0057803

Please test and close if ok

The windows IDE has an option in Editor/General/Misc to change the level of integration

Issue History

Date Modified Username Field Change
2009-02-09 14:12 Saeka-jp New Issue
2009-02-09 14:12 Saeka-jp Widgetset => Win32
2009-02-09 14:39 Martin Friebe Relationship added related to 0011819
2009-02-09 14:42 Martin Friebe Status new => assigned
2009-02-09 14:42 Martin Friebe Assigned To => Martin Friebe
2009-02-09 14:44 Martin Friebe LazTarget => 1.0
2009-02-09 14:53 Dmitry Boyarintsev Note Added: 0025225
2009-02-09 15:16 Saeka-jp Note Added: 0025226
2009-02-11 10:17 Saeka-jp File Added: imm.pp
2009-02-11 10:18 Saeka-jp Note Added: 0025263
2009-02-11 10:20 Saeka-jp Note Edited: 0025263
2009-02-19 16:48 Saeka-jp File Added: synedit_pp_18762.patch
2009-02-19 16:54 Saeka-jp Note Added: 0025582
2009-02-19 17:32 Martin Friebe Note Added: 0025583
2009-02-21 00:35 Saeka-jp Note Added: 0025603
2009-02-21 00:37 Saeka-jp Note Edited: 0025603
2009-02-21 00:38 Saeka-jp Note Edited: 0025603
2009-02-23 00:50 Martin Friebe Note Added: 0025646
2009-02-23 22:16 Saeka-jp Note Added: 0025691
2010-12-28 14:14 Vincent Snijders Note Added: 0044653
2012-02-11 20:01 Zeljan Rikalo Note Added: 0056759
2012-02-11 20:01 Zeljan Rikalo Status assigned => feedback
2012-02-13 01:58 Martin Friebe Note Added: 0056787
2012-03-09 21:44 Martin Friebe Relationship added related to 0021450
2012-03-11 01:45 Martin Friebe Note Edited: 0056787
2012-03-17 23:40 Martin Friebe Status feedback => resolved
2012-03-17 23:40 Martin Friebe Fixed in Version => 0.9.31 (SVN)
2012-03-17 23:40 Martin Friebe Resolution open => fixed
2012-03-17 23:40 Martin Friebe Note Added: 0057803
2012-03-17 23:40 Martin Friebe Target Version => 1.0.0