Recent

Author Topic: The issue of TKMEMO not allowing Chinese input on Linux systems  (Read 1189 times)

jianwt

  • Full Member
  • ***
  • Posts: 164
The issue of TKMEMO not allowing Chinese input on Linux systems
« on: November 21, 2025, 02:21:34 am »
The issue of TKMEMO not allowing Chinese input on Linux systems

As the title suggests, how can we solve the problem where the TKMEMO control in kcontrols 1.7.3, when used in a Lazarus 3.4 (Linux64) GTK2 application, does not allow Chinese input on Linux systems (such as Deepin), while English input works fine? There is no such issue on Windows. Please help!

The TKMEMO control is really great. I hope the author can see this issue and help my friend use this control in Chinese on the Linux system.

dbannon

  • Hero Member
  • *****
  • Posts: 3666
    • tomboy-ng, a rewrite of the classic Tomboy
Re: The issue of TKMEMO not allowing Chinese input on Linux systems
« Reply #1 on: November 21, 2025, 03:27:24 am »
You must use a TTF font, not all fonts supplied with various OSs are TTF fonts, please check the full name of the font you are using. I recommend the noto cjk fonts, https://github.com/notofonts/noto-cjk. But there is a lot I don't understand about Chinese fots I am afraid.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

jianwt

  • Full Member
  • ***
  • Posts: 164
Re: The issue of TKMEMO not allowing Chinese input on Linux systems
« Reply #2 on: November 21, 2025, 03:52:47 am »
You must use a TTF font, not all fonts supplied with various OSs are TTF fonts, please check the full name of the font you are using. I recommend the noto cjk fonts,
It's fine to display Chinese, but it's impossible to call the input method in KMEMO to directly input Chinese in KMEMO.

https://github.com/notofonts/noto-cjk. But there is a lot I don't understand about Chinese fots I am afraid.

Davo
@dbannon
Thank you for your answer. There are many Chinese fonts, and it is impossible to apply only TTF font. Please take a look at the fonts in the following link. Can you directly input Chinese in KMEMO using the built-in input method of linux? It's not by copying and pasting Chinese characters.

It's fine to display Chinese, but it's impossible to call the input method in KMEMO to directly input Chinese in KMEMO.

https://itc.suibe.edu.cn/2024/0319/c16967a168678/page.htm
« Last Edit: November 21, 2025, 04:00:34 am by jianwt »

jianwt

  • Full Member
  • ***
  • Posts: 164
Re: The issue of TKMEMO not allowing Chinese input on Linux systems
« Reply #3 on: November 21, 2025, 04:06:33 am »
This is the appearance of the Chinese font directly displayed in the linux system.

Both import and copy-paste can be displayed normally, but it's just impossible to call the input method to directly input Chinese in KMEMO.

Thausand

  • Sr. Member
  • ****
  • Posts: 458
Re: The issue of TKMEMO not allowing Chinese input on Linux systems
« Reply #4 on: November 21, 2025, 04:15:29 am »
@jianwt:
Have only this problem when use KMemo ? I have ask then have know if have you chinese simplified method activate for Linux.

GB2312 is font simplified chinese and have code-page special (is say wikipedia: https://en.wikipedia.org/wiki/GB_2312).

jianwt

  • Full Member
  • ***
  • Posts: 164
Re: The issue of TKMEMO not allowing Chinese input on Linux systems
« Reply #5 on: November 21, 2025, 04:22:50 am »
@jianwt:
Have only this problem when use KMemo ? I have ask then have know if have you chinese simplified method activate for Linux.

GB2312 is font simplified chinese and have code-page special (is say wikipedia: https://en.wikipedia.org/wiki/GB_2312).

Under the linux system, I placed two controls, TKMEMO and the TMEMO that comes with the lazarUS system, on the same interface. In TMEMO, Chinese input can be called, but TKMEMO cannot input Chinese.

Thausand

  • Sr. Member
  • ****
  • Posts: 458
Re: The issue of TKMEMO not allowing Chinese input on Linux systems
« Reply #6 on: November 21, 2025, 05:03:26 am »
Ok, thank for answer jianwt. Then I sorry and not know what can have make error.

dbannon

  • Hero Member
  • *****
  • Posts: 3666
    • tomboy-ng, a rewrite of the classic Tomboy
Re: The issue of TKMEMO not allowing Chinese input on Linux systems
« Reply #7 on: November 21, 2025, 06:01:32 am »
Please take a look at the fonts in the following link. Can you directly input Chinese in KMEMO using the built-in input method of linux? It's not by copying and pasting Chinese characters.

It's fine to display Chinese, but it's impossible to call the input method in KMEMO to directly input Chinese in KMEMO.

https://itc.suibe.edu.cn/2024/0319/c16967a168678/page.htm

I'm sorry jianwt, that is way beyond my skill set. I cannot read the web page you linked and I do not know how to  "directly input Chinese". I am afraid you will need work it out your self.

KMemo stores characters as UTF8 in its blocks. Most Chinese characters are three byte numbers. So, maybe start by experimenting with creating a KMemo block containing a known Chinese string ?  I know thats not what you want at this stage but it may help you understand whats actually happening.

And, what does actually happen if you try to "directly input Chinese" - does it ignore you or do the wrong characters appear ?

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

jianwt

  • Full Member
  • ***
  • Posts: 164
Re: The issue of TKMEMO not allowing Chinese input on Linux systems
« Reply #8 on: November 21, 2025, 06:59:04 am »
Please take a look at the fonts in the following link. Can you directly input Chinese in KMEMO using the built-in input method of linux? It's not by copying and pasting Chinese characters.

It's fine to display Chinese, but it's impossible to call the input method in KMEMO to directly input Chinese in KMEMO.

https://itc.suibe.edu.cn/2024/0319/c16967a168678/page.htm

I'm sorry jianwt, that is way beyond my skill set. I cannot read the web page you linked and I do not know how to  "directly input Chinese". I am afraid you will need work it out your self.

KMemo stores characters as UTF8 in its blocks. Most Chinese characters are three byte numbers. So, maybe start by experimenting with creating a KMemo block containing a known Chinese string ?  I know thats not what you want at this stage but it may help you understand whats actually happening.

And, what does actually happen if you try to "directly input Chinese" - does it ignore you or do the wrong characters appear ?

Davo

To install a Chinese input method on Linux, you can follow these steps:

Install fcitx

Enter” sudo apt install fcitx “ in the terminal.

Set fcitx as the system input method and ensure it starts automatically upon startup.

If you need to use a pinyin input method, you can install google Pinyin or sun Pinyin through the apt command.

After installing the Chinese input method, download the font files related to Chinese, and you can input Chinese.

https://itc.suibe.edu.cn/2024/0319/c16967a168678/page.htm

d2010

  • Sr. Member
  • ****
  • Posts: 251
Re: The issue of TKMEMO not allowing Chinese input on Linux systems
« Reply #9 on: November 21, 2025, 07:37:03 am »
The issue of TKMEMO not allowing Chinese input on Linux systems
I hope  I do not spam, please, please . . .
You send to me, at PM, you send the "LinuxChinese as Dvd.Iso" downloading link
perhaps

jianwt

  • Full Member
  • ***
  • Posts: 164
Re: The issue of TKMEMO not allowing Chinese input on Linux systems
« Reply #10 on: November 21, 2025, 08:50:57 am »
The issue of TKMEMO not allowing Chinese input on Linux systems
I hope  I do not spam, please, please . . .
You send to me, at PM, you send the "LinuxChinese as Dvd.Iso" downloading link
perhaps
@d2010
The issue that the KMEMO control in the Linux system cannot input Chinese in real time has been clearly stated by me above. What else do you need?

CM630

  • Hero Member
  • *****
  • Posts: 1593
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: The issue of TKMEMO not allowing Chinese input on Linux systems
« Reply #11 on: November 21, 2025, 12:49:20 pm »
...In TMEMO, Chinese input can be called, but TKMEMO cannot input Chinese...
Sounds like a bug in KMemo. IMHO, you should file a bug report in https://github.com/kryslt/KControls/.
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

jianwt

  • Full Member
  • ***
  • Posts: 164
Re: The issue of TKMEMO not allowing Chinese input on Linux systems
« Reply #12 on: November 21, 2025, 02:41:52 pm »
...In TMEMO, Chinese input can be called, but TKMEMO cannot input Chinese...
Sounds like a bug in KMemo. IMHO, you should file a bug report in https://github.com/kryslt/KControls/.


OK

jianwt

  • Full Member
  • ***
  • Posts: 164
Re: The issue of TKMEMO not allowing Chinese input on Linux systems
« Reply #13 on: November 27, 2025, 10:42:54 am »
KMEMO还有个大的中文字符的问题,就是:在KMEMO里输入中文内容为“这是一个问题段落,应该显示为楷体。更好的分隔符号而而而而而的规范化地方地方地方地方。“,当KMEMO别太宽了,保证输入上述字符串后,底下的滚动条出现(不出现滚动条不会出现这个问题)或设置成换行,就可以演示这个问题了,然后将光标放在这段中文中的任何一个位置,然后回车,中文字符串被断为2行,然后你在该位置再按”BACKSPACE“删除键,按常理光标会在第1行,2个段落块又合成一个段落块,但光标还在第2行首。也不会重新组合成1个段落,还是2个段落存在。
进一步查,发现当设置KMEMO的options里的eoWrapSingleChars(True)时,才会有这个问题,如果设置eoWrapSingleChars(FALSE)时,则不会发生这个问题。


There is a major issue with Chinese characters in KMEMO. When you input the Chinese text "这是一个问题段落,应该显示为楷体。更好的分隔符号而而而而而的规范化地方地方地方地方。" in KMEMO, if the width of KMEMO is not too wide, ensuring that the scroll bar appears after inputting the above string (this problem won't occur without the scroll bar) or set it to wrap, you can demonstrate this issue. Then, place the cursor at any position within this Chinese text and press the Enter key. The Chinese string will be split into two lines. If you press the "BACKSPACE" key at this position again, logically the cursor should be on the first line and the two paragraph blocks should merge into one. However, the cursor remains at the beginning of the second line. The two paragraphs do not recombine into one and still exist as two separate paragraphs.

Upon further investigation, it was found that this issue only occurs when the eoWrapSingleChars option in KMEMO is set to True. If it is set to False, the problem does not occur.
« Last Edit: November 27, 2025, 12:47:59 pm by jianwt »

Thaddy

  • Hero Member
  • *****
  • Posts: 18728
  • To Europe: simply sell USA bonds: dollar collapses
Re: The issue of TKMEMO not allowing Chinese input on Linux systems
« Reply #14 on: November 27, 2025, 11:30:54 am »
I don' t think TKmemo was designed to support Asian languages.
Maybe cnpack has a memo that supports proper Chinese?
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

 

TinyPortal © 2005-2018