Recent

Author Topic: (Solve by myself) MacOSX on M1 , IME input on Chinese character  (Read 3777 times)

powerpcer

  • Full Member
  • ***
  • Posts: 102
Re: MacOSX on M1 , IME input on Chinese character
« Reply #15 on: September 19, 2022, 03:07:02 pm »
by an ugly solution, all done finally.
now UTF8keypress will get the correct character.
and virtualkey and backspace are handle correctly.

fixed with
FPC 3.3.1
Lazarus 2.3.0
 modified interface of cocoa
and packages of cocoa.

zip name with corresponding path.

fix procedure
1. replace those files
2. go to packages folder of fpc
3. fppkg -C /path/to/your/fppkg.cfg install
4. backup your old fpc packages units
5. replace with your new fpc packages units
6. copy rtl folder from old units , (how to build rtl packages?)
7. open lazarus
8. rebuild lazarus.
9. now lazarus should typing chinese correctly. others IME may also be correct.
10. done!!

« Last Edit: September 21, 2022, 06:26:40 pm by powerpcer »

AlexTP

  • Hero Member
  • *****
  • Posts: 2488
    • UVviewsoft

powerpcer

  • Full Member
  • ***
  • Posts: 102
Re: (Solve by myself) MacOSX on M1 , IME input on Chinese character
« Reply #17 on: September 26, 2022, 04:26:33 pm »

powerpcer

  • Full Member
  • ***
  • Posts: 102
Re: (Solve by myself) MacOSX on M1 , IME input on Chinese character
« Reply #18 on: September 27, 2022, 02:00:00 pm »
more ugly patch for chinese IME and japanese Romaji.
due to doCommandBySelector not be called
fix crash on option-U
« Last Edit: October 02, 2022, 05:37:11 am by powerpcer »

powerpcer

  • Full Member
  • ***
  • Posts: 102
Re: (Solve by myself) MacOSX on M1 , IME input on Chinese character
« Reply #19 on: October 05, 2022, 02:41:34 am »
more clean patch, do more testing already.

powerpcer

  • Full Member
  • ***
  • Posts: 102
Re: (Solve by myself) MacOSX on M1 , IME input on Chinese character
« Reply #20 on: October 07, 2022, 10:46:05 am »
Japanese Romaji IME, it needs more temporary character handling
than Chinese IME on Client side(Application have to show them, if not use EDIT/MEMO)
because of UTF8KeyPress(), it has no those information.
so we need add more function to support this.
procedure InputClientInsertTextLoc(const utf8: string;loc,len:integer);
--> this procedure should fire a UTF8keypress, but with a string directly and postion and length for replacing.

procedure InputClientSetTextMark(const utf8: string;loc,len:integer);
--> due to Romaji, let application to handle the temporary character display.

procedure InputClientGetPos(const utf8: string;var loc,len:integer);
--> let application to provide where the position of IME should display.

they should map to UTF8StringPress, UTF8StringMark, UTF8InputPos.

 

TinyPortal © 2005-2018