Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

TextMesh Pro TMP: Breaking Chinese Bugs for Traditional ZhuYin ("BoPoMoFo" - Taiwan Locale)

Discussion in 'Unity UI (uGUI) & TextMesh Pro' started by MrLucid72, Jul 27, 2019.

  1. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    622
    When using TextMeshPro InputFields for traditional Chinese in Taiwan (called "ZhuYin" or "BoPoMoFo" where you use a combination of phonetics and numbers [indicating tone] to make characters), there are some dominant (but random) bugs:

    Screenshot:



    Screencast:

    https://recordit.co/2e5R5meUn5

    Referencing the screenshot above:
    1. Click in TMPInputField

    2. 1st char will be in Chinese (normal)

    3. 2nd char will become English (expected: Chinese) -- indicated in the example screenshot; notice the number 5, followed by 2 Chinese characters.

    4. If you unfocus the TMPInputField (click away) and return, it'll work for until you submit once -- then steps #2 and #3 (above) will be repeated. There are no special OnValueChange() events associated with this TMPInputField. Submitting will only clear.

    5. If you continue to focus the TMPInputField and type characters, the 1st char will always be an English character until you unfocus >> refocus (then the bug returns after the 1st line).
    • Anytime you see an English char or number @ char[0], it's bugging out.

    • Both the TMPInputField and the submitted txt contain the buggy str (which is why it also reflects in the chat, which is also a read-only TMPInputField)
     
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,050
    Thanks for the feedback / report.

    There are a few issues related to IME that have been present for a while now. These are not specific to TMP or even the legacy text system but to IME handling which is handled by the Input team.

    I will be talking to the Input team shortly and will be sure to bring up these issues as well.

    I'll post back once I have additional information.
     
    MrLucid72 likes this.
  3. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    622
    Ah, thanks for looking into this!
     
  4. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    622
    Hi @Stephan_B , any chance you have a timeline estimate on this? I'm approaching an awkward point where I must soon decide if I should try to find a ghetto workaround or if I should wait for a fix. We're currently in alpha for Chinese testing. Let me know if you require additional details.

    Apologies for the pressure! Just trying to plan :)

    PS - have any temporary workaround suggestions that would be easy to revert later upon a fix?
     
    Last edited: Aug 10, 2019
  5. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,050
    I will take a look over the weekend and provide feedback no later than Sunday night.
     
    MrLucid72 likes this.
  6. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,050
    Can you check if you are getting the same behavior in any Editor text field / inspector? Also please see if you get the same behavior in the UI Input Field.

    What character sequence / keyboard keys are you typing to reproduce these behavior?

    Whenever the input field is un-focused, IME is disabled. However, whenever you re-focus the input field, IME is not re-enabled. Right now I have to use CTRL + Spacebar to re-enable IME.

    There are definite issue with the IME input system.
     
    MrLucid72 likes this.
  7. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    622
    I'll be able to test in a couple days and get back to you~
     
  8. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    622
    @Stephan_B Ok, I got my wife to help out (my Chinese is limited, especially Bopomofo [Taiwan, Traditional Chinese] IME):



    Code (CSharp):
    1. ㄏㄏ>> c space c space
    2. >>xul6
    3. >>ru0 space
    4. >>g4
    5. >>5j/ space
    6. >>jp6
    7. I tried to type "中文" again but it  change to english automatically, so it showed "5" at the next line
    8. >>j/ space
    9. trying to type "中" again, and it worked
    10. trying to type "中" again, it falled and show as "5翁"
    11. (when I type 中, it stared with keyborad "j". )
    12. trying to type "文(jp6)" but it show as "j恩"
    13. how to type 恩>> "p space"
    14. If you need more info or how you want as to type, let me know. Thanks
    15.  
    I'm too deep in a messy project to test anything else, yet, but hope this helps.
     
  9. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,050
    I'll re-test these.

    Were you able to test this in a normal text field in the Editor in some inspector?