db create/update UTF8 chars fails

39 views
Skip to first unread message

Jorge Salvat

unread,
Jul 14, 2022, 10:53:30 PM7/14/22
to py4web
Since 3 months ago,  forms that create/update text or string fields containing UTF8 characters won't update on db.

In   showcase   app,   /create_form.py   and   /update_form/3
If you enter a name like:  Inés España
it fails to update the db.

CarlosDB

unread,
Jul 15, 2022, 8:22:38 AM7/15/22
to py4web
The problem is related to the correction of a bug in the grid when using search_queries.

Details are in this thread
https://groups.google.com/g/py4web/c/fuI6I_7LbSk/m/AZYm7kmqAAAJ

search_queries works fine but seems to have side effects on the forms when typing characters like ñ, àèìòù and the like.

Now at line 785 of form.py
original_value = post_vars.get(field.name)

When field.name has characters like above post_vars.get(field.name) returns None.
Seems to be in problem in FormsDict.getunicode()


Carlos.

Maurice Waka

unread,
Jul 15, 2022, 1:52:57 PM7/15/22
to CarlosDB, py4web
I recently had raised a similar issue with special characters as ≥, ”, – , just to name a few. It always saves a None value and if you have a validator such as 'IS_NOT_EMPTY()' for the field, you get an error: 'Entera value'
I hope it's related.
regards

--
You received this message because you are subscribed to the Google Groups "py4web" group.
To unsubscribe from this group and stop receiving emails from it, send an email to py4web+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/py4web/2abe4bd9-6f89-453a-b6bb-9e167aebde3cn%40googlegroups.com.

Christian Varas

unread,
Aug 8, 2022, 4:41:54 PM8/8/22
to Jorge Salvat, py4web
I can confirm this is happening now, i can't update/insert text with accents.
Is There is any fix/workaround  for this ?

Any help is appreciated!.

Cheers.
Chris.

--
You received this message because you are subscribed to the Google Groups "py4web" group.
To unsubscribe from this group and stop receiving emails from it, send an email to py4web+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages