snozbot / fungus

An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
MIT License
1.63k stars 291 forks source link

Error typing Unicode characters #995

Closed magda84 closed 3 years ago

magda84 commented 3 years ago

Hello, I am using Greek keyboard and I can type Greek characters but the diacritics are missing. I also can't copy paste in the inspector or the blocks that I create. Strangely, it works fine if I use the edit menu. I am using Ubuntu 20.04 on a clean install and latest Unity LTS version. I have reached the official Linux editor forums and this is what they suggested:

"So copy pasting doesn't work with the keyboard but works with the menu? In my opinion this must be the shortcut bug I told you about. Maybe try remapping the shortcuts in Unity's settings, or upgrade to a newer version if you can.

Regarding the main issue, did you try normalizing the string? I can't be sure because I can't reproduce the bug, but it looks like a normalization issue to me. Maybe try to make a custom property drawer for your inspector and call the String.Normalize() method and see if this fixes the issue."

Worfrug from the discord server suggest to report a bug. He said that "this might be a bug with Fungus' custom property whatsits then. I suggest you copy-paste this post (plus a bit of extra stuff where you explain what you're doing etc) and post it as a bug over at https://github.com/snozbot/fungus/issues"

I beg for a fix. This is my first bug report on Github -be kind!

Arylos07 commented 3 years ago

@magda84 I can look into this. Do you have the text that works otherwise but does not work in Unity? I can see if there's some serializing errors going on.

stevehalliwell commented 3 years ago

Can you provide samples or screenshots of what is and is not copying correctly?

Can you also confirm that you or cannot copy this text between non-fungus elements,? e.g. directly into a Unity.Text. I don't run Unity in Linux, or Greek keyboard, so having the above info will at least help narrow it down to either something Fungus itself is doing or if it's something that Unity is doing.

breadnone commented 3 years ago

Selecting Extended ASCII in the Font Asset Creator should fix this (TMPro), since diacritics are not part of standard ascii

magda84 commented 3 years ago

@magda84 I can look into this. Do you have the text that works otherwise but does not work in Unity? I can see if there's some serializing errors going on.

You can use any Greek text. Καλημέρα κόσμε! This is the equivalent to "Hello World" If you want to add diacritics to a vowel you need to press the key ; + any vowel (a,e,i,u,o e.tc) When I copy paste to all Fungus everything is typed without diacritics. Copy paste is not working also. But when I go to edit menu > paste everything work as expected. You can try any text with Greek characters. I guess. But I think this is a general Unity problem If you need anything else please, I would love to help!

magda84 commented 3 years ago

Selecting Extended ASCII in the Font Asset Creator should fix this (TMPro), since diacritics are not part of standard ascii

I am sorry, It is an input problem. As an example copy paste is not working. I am using Ubuntu and I do not know yet, if 20.04 is fully supported by Unity's editor I have tried this whole morning creating font atlases using custom and extended Ascii etc with a few friends from Fungus discord server but nothing changes. Issue remains.

magda84 commented 3 years ago

Finally it is a Unity related thing, only for Linux's editors.

stevehalliwell commented 3 years ago

Finally it is a Unity related thing, only for Linux's editors.

Sorry to hear it, but pleased it wasn't something strange and Fungus specific.