ArgumentException when copying CharSet text

More
6 years 4 weeks ago - 6 years 4 weeks ago #2867 by studenman
I used Google to do a test translation to German and then used the CharSet tool to show the 100 characters that it found.



When I hit "Copy To Clipboard" I get the follow exception, and nothing is copied (screenshot attached):
ArgumentException: invalid utf-16 sequence at -272642832 (missing surrogate tail)
Parameter name: string
I2.Loc.LocalizationEditor.OnGUI_Tools_CharSet () (at Assets/I2/Localization/Scripts/Editor/Localization/LocalizationEditor_Tools_CharSet.cs:109)
I2.Loc.LocalizationEditor.OnGUI_Tools (Boolean reset) (at Assets/I2/Localization/Scripts/Editor/Localization/LocalizationEditor_Tools.cs:42)
I2.Loc.LocalizationEditor.OnGUI_Main () (at Assets/I2/Localization/Scripts/Editor/Localization/LocalizationEditor.cs:80)
I2.Loc.LocalizationEditor.OnInspectorGUI () (at Assets/I2/Localization/Scripts/Editor/Inspectors/LanguageSourceInspector.cs:163)

However, if I cursor around in the text, I noticed that there are about 10 invisible characters at the end of this text. If I manually copy the visible characters with Cmd+C, then I don't get an exception.

Follow Tiny Bubbles Development:
Twitter | Facebook | Web
Attachments:
Last edit: 6 years 4 weeks ago by studenman.

Please Log in or Create an account to join the conversation.

More
6 years 4 weeks ago #2870 by Frank
I have been trying to reproduce this issue but I haven't been able to make it happen.
Do you mind emailing me your I2Languages.prefab or a csv that include the german texts you are using. I will add a fix as soon as I be able of reproducing the crash.

Thanks!!
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

More
6 years 4 weeks ago - 6 years 4 weeks ago #2873 by studenman
OK, I don't know your email, so I sent it to admin @ i-i . com

The prefab has en-US, de-DE, and ja in there. Same thing happens with CharSet and japanese. There are invisible characters in the resulting text and they cause an exception on copy.

Follow Tiny Bubbles Development:
Twitter | Facebook | Web
Last edit: 6 years 4 weeks ago by studenman.

Please Log in or Create an account to join the conversation.

More
6 years 3 weeks ago #2882 by Frank
This is now fixed in 2.8.5a2.
The problem was that some character combinations where making unity believe that the resulting string had UTF-16 encoding, (and unity doesn't support that encoding correctly).
Now all its forced to be UTF-8.

Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The following user(s) said Thank You: studenman

Please Log in or Create an account to join the conversation.

More
6 years 3 weeks ago #2883 by studenman
Excellent, glad you were able to reproduce it!

Follow Tiny Bubbles Development:
Twitter | Facebook | Web

Please Log in or Create an account to join the conversation.

Time to create page: 0.196 seconds
Template by JoomlaShine