For me this happens as a side-effect of #178: I'm using 8-bit locale and I can occasionaly have a foreign utf8 symbol in a text object. In this case text objects are shown correctly, but Edit dialog truncates text starting from the "bad" symbol (and the text can become empty).
I think it's good to fix the crash anyway, but not sure what is better to do with #178.
Is it possible to show text and comments in dialogs in utf8 and avoid conversions? Is it reasonable to set utf8 locale in xfig internally? Or we can just say that it's an expected situation and I can always run xfig in utf8 locale if needed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've checked that xfig can read empty text objects from a file (but then it's not possible to select end edit them). So another possible solution for this issue would be to allow setting empty text in the dialog.
Last edit: Vladislav Zavjalov 2025-01-01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
With commit [6cbbec] editing a text object and truncating the string to be empty is now equivalent to deleting that text object. Immediate Undo, accordingly, restores the original text, before the edit operation was attempted. With respect to text being truncated due to characters not available in the current locale, see ticket [#178].
For me this happens as a side-effect of #178: I'm using 8-bit locale and I can occasionaly have a foreign utf8 symbol in a text object. In this case text objects are shown correctly, but Edit dialog truncates text starting from the "bad" symbol (and the text can become empty).
I think it's good to fix the crash anyway, but not sure what is better to do with #178.
Is it possible to show text and comments in dialogs in utf8 and avoid conversions? Is it reasonable to set utf8 locale in xfig internally? Or we can just say that it's an expected situation and I can always run xfig in utf8 locale if needed.
I've checked that xfig can read empty text objects from a file (but then it's not possible to select end edit them). So another possible solution for this issue would be to allow setting empty text in the dialog.
Last edit: Vladislav Zavjalov 2025-01-01
With commit [6cbbec] editing a text object and truncating the string to be empty is now equivalent to deleting that text object. Immediate Undo, accordingly, restores the original text, before the edit operation was attempted. With respect to text being truncated due to characters not available in the current locale, see ticket [#178].
Related
Tickets: #178
Commit: [6cbbec]
I think, it's a reasonable solution. Probably, empty text read from file should be deleted as well (like it happens with 2-point polygons)
The above commit does ignore empty text on reading. Previously, the empty text objects were only ignored when saving a fig file.