ImpulseAdventure / GUIslice-Builder

Cross-platform drag & drop GUI builder for GUIslice
Other
163 stars 34 forks source link

Big bug - when inserting a unicode eg. polish charts #175

Closed popos123 closed 2 years ago

popos123 commented 2 years ago

Describe the bug

Just when insert in text box a unicode eg. polish charaters - the program is crashing and doesn't run anway (need to REINSTALL). Ofcourse when you forgot to change option under the text imput to UTF-8

To Reproduce

Steps to reproduce the behavior:

  1. Insert a text label
  2. Apply some unicode characters eg. ą, ę, ó, ł
  3. See crash

Expected behavior

Permanent crash and app doesn't run.

Crash log / Project files

builder.log 20210924_194507.txt

Version

Pconti31 commented 2 years ago

@popos123 Yes, I still need to fix this code path to avoid crashes. This is hard to prevent because the way the Builder was first designed you simply fill in your properties for a UI element one at a time. Fonts screws this up. You must first select a font then and only then enter Text. The font you have is preselected as a starting font of BuiltIn(1x)->5x8pt7b which only supports ascii 0 to 128. Causing the crash. You can see the full set of characters when to bring up a character map by first selecting the Text property value by double clicking and then picking character map.

Now the really bad news Setting the utf8 flag doesn't really help support utf8 in GUIslice API except for LINUX. Although there are some exceptions for people using the TFT_eSPI driver with VLW fonts.

See answers QUESTION: UTF-8 Support GUI Builder #140 Crash when input non-ascii chars 174

Paul--

Pconti31 commented 2 years ago

@popos123 I just finished testing the 0.17.0 version of the Builder and the crash itself is fixed in that version (not yet released). I still want to modify it to report an error when people enter text that isn't supported by the chosen font. I'm not sure when I can do the 0.17.0 release since I have to wait for @ImpulseAdventure to do the 0.17.0 release of the API. Paul--

popos123 commented 2 years ago

@Pconti31 thank you so much. i can;t wait for new update :)

umsmin commented 1 year ago

@Pconti31 My Guislice-Builder 0.17.b18 and also the older one show me the text with German umlaut. I use Arial Fonts with full size off 0xFF. But when he generate the code something goes wrong. I write Gerät : and he make Ger\xe4t : He also don't care of setting the flag on UTF-8 or not. After I change it manually in the _GLSC.h file all be well.

Here is one from the fonts:

arial10pt8b.zip

Uli