Author Topic: Entering Multibyte Characters  (Read 990 times)

sasaco

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 6
    • View Profile
Entering Multibyte Characters
« on: February 06, 2023, 01:08:59 pm »
This is my first post.
Thank you all for your help.

As shown in the following posting, there is a problem with entering multibyte characters.
https://paramquery.com/forum/index.php?topic=2164.msg8523#msg8523
https://paramquery.com/forum/index.php?topic=1812.0

The problem is that when a multibyte character is entered, the first positional character is half-width.
Is there any way to fix this?

Please let me know if the response is that it is difficult or time consuming to resolve.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Entering Multibyte Characters
« Reply #1 on: February 06, 2023, 01:55:29 pm »
This has been already resolved in the recent versions of pqgrid  :)

Please try to type multibyte language in these examples:

https://paramquery.com/pro/demos/editing_custom

https://paramquery.com/pro/demos/edit_multiline

sasaco

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Entering Multibyte Characters
« Reply #2 on: February 07, 2023, 07:29:36 am »

Thanks for the reply.

When I tried to type in a cell while the cell was not in edit mode, it displayed "hh" when I typed "h" as in the video in the link below.
Is this issue unresolved?

I am using chrome as my browser.

https://reccloud.com/jp/u/or3u02x

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Entering Multibyte Characters
« Reply #3 on: February 07, 2023, 03:15:23 pm »
Thanks for your input.

Are you using IME with English keyboard?

sasaco

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Entering Multibyte Characters
« Reply #4 on: February 07, 2023, 05:44:18 pm »
We are using pqGrid in our web app.
We used a Japanese IME for this project because we are considering offering our services in languages other than English.

In the future, we plan to offer services in Chinese, Vietnamese, and other Asian languages.
This problem is not solved. Or if it takes time to solve it, we will have to think of an alternative.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Entering Multibyte Characters
« Reply #5 on: February 07, 2023, 11:19:29 pm »
Please use this patch for v8.7.0, include this source just after including pqgrid js file.

Code: [Select]
<script>
    jQuery.paramquery.cKeyNav.prototype.onInput = function (t) { var e = this.that, l = this.fe; if (!this.ctrlKeyDown && l && null != l.rowIndxPage && null != l.colIndx) { var i, r, a = e.getEditor(l, "type"), n = $(t.target); if (e.isEditable(l) && a && "select" != a && (e.editCell(l), i = e.getEditCell().$editor, r = n.val(), i)) { if (i[0].filled) return; if (t.originalEvent.isComposing) { i.val(""); return } i.val(r), i[0].filled = !0 } n.val("") } };
</script>

https://paramquery.com/pro/demos/edit_multiline

sasaco

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Entering Multibyte Characters
« Reply #6 on: February 08, 2023, 06:59:55 am »
Thank you for sending the patch.

I think this will solve the problem if it is English multibyte characters.
However, I still find it problematic for use in Japanese and Chinese.

For Japanese and Chinese, we input alphabetic character strings called pinyin or romaji on the keyboard, and then convert them to kanji or hiragana by pressing the space key or other keys that have conversion functions.

Therefore, if the first character is fixed as shown in the video, it cannot be converted to Kanji or Hiragana.
For example, the character "ひ" can be created by typing "hi". Similarly, the character "い" can be created by simply typing "i".
However, if the first character is fixed and you type "hi" to create the character "hi," the character "hい" will be created.

https://www.apowersoft.jp/free-online-screen-recorder

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Entering Multibyte Characters
« Reply #7 on: February 09, 2023, 12:48:02 pm »
Thank you for sharing more details.

First character fix would require fundamental change in editor setup which would take time.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Entering Multibyte Characters
« Reply #8 on: March 17, 2023, 03:25:39 pm »
The issue is caused when user starts typing directly on a cell while there is no issue when user types in a cell editor.

For now the workaround is to prevent user from typing directly on a cell or initialize the editor before user starts typing on a cell.

Please set editModel.pressToEdit to false, https://paramquery.com/pro/api#option-editModel It would cause the editor to initialize when cell is single or double clicked as per the option editModel.clicksToEdit
« Last Edit: March 17, 2023, 03:32:09 pm by paramvir »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Entering Multibyte Characters
« Reply #9 on: July 21, 2023, 01:33:18 pm »
This issue is resolved in v9.0.1

sasaco

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Entering Multibyte Characters
« Reply #10 on: January 17, 2024, 01:11:57 pm »
Sorry for the late reply. Thanks for the correction!
I will use the latest version!