Weird behaviour with UTF8 on Tryton client 6.4.11 with size limited Text field
I came across a weird situation in Tryton version 6.4. I have a Text
field defined in a Model
and limited it's size so the user gets an error when they have entered too much text.
summary = fields.Text('Sale Intro Text', size=300)
However when the user now want to enter 'strange' characters like éëáä
the client does strange things:
- On windows, it's eating the the amount of the 'strange' characters away from the end of the text when saving the record.
- On Linux, it crashes when the character is entered with
** Gtk:ERROR:../gtk/gtktextbtree.c:1182:_gtk_text_btree_insert: assertion failed: (g_utf8_validate (&text[sol], chunk_len, NULL)) Bail out! Gtk:ERROR:../gtk/gtktextbtree.c:1182:_gtk_text_btree_insert: assertion failed: (g_utf8_validate (&text[sol], chunk_len, NULL)) Aborted (core dumped)
Removing the size=300
allows to enter the 'strange' characters again, but now there is no limit.
It this something coming from the underlying GTK libraries? I also noticed this error seems to be gone in version 6.6