Recent

Author Topic: Chinese input in edit and memo in Linux is incorrect  (Read 1253 times)

myisjwj

  • Jr. Member
  • **
  • Posts: 83
Chinese input in edit and memo in Linux is incorrect
« on: November 28, 2023, 01:42:09 pm »
There is no problem in entering English, but errors will be reported when entering Chinese.

Pango:ERROR:.. /pango/pango-layout.c:4606:get_items_log_attrs: assertion failed: (item->length <= (start + length) - item->offset)
Bail out!  Pango:ERROR:.. /pango/pango-layout.c:4606:get_items_log_attrs: assertion failed: (item->length <= (start + length) - item->offset)
Aborted (core dumped)

Another problem is that it works when you use Memo in the main window. If there is a memo control in the new form, it will randomly error and automatically exit the application.

The input method is fcitx.

myisjwj

  • Jr. Member
  • **
  • Posts: 83
Re: Chinese input in edit and memo in Linux is incorrect
« Reply #1 on: November 30, 2023, 03:13:57 am »
The problem is found. If the form contains a Tmemo control, use Form1.Show. Or if the panel contains Tmemo, use Panel1.Visible:=True; There will be problems. Use panel 1.bringtofront; There won't be a problem. The reason is not known.

myisjwj

  • Jr. Member
  • **
  • Posts: 83
Re: Chinese input in edit and memo in Linux is incorrect
« Reply #2 on: December 07, 2023, 05:06:00 am »
All the reasons found. Under Linux can not operate in the event the main thread of the UI, can only use the Application. The QueueAsyncCall to operate.

AlexTP

  • Hero Member
  • *****
  • Posts: 2488
    • UVviewsoft
Re: Chinese input in edit and memo in Linux is incorrect
« Reply #3 on: December 07, 2023, 06:14:10 pm »
- What widgetset, gtk2 or qt5 or qt6?
- Wayland or X ?
- What OS distro and version?
« Last Edit: December 07, 2023, 06:27:26 pm by AlexTP »

myisjwj

  • Jr. Member
  • **
  • Posts: 83
Re: Chinese input in edit and memo in Linux is incorrect
« Reply #4 on: December 08, 2023, 01:28:21 am »
gtk2
system arm64:ubuntu18,UOS,Armbian 23
system x86:centos7
CPU:x86_64,arm(armhf)
The above systems and cpus have been tested. X86 has fewer problems.

 

TinyPortal © 2005-2018