valq7711 / ombott

This is bottle spin-off (One More BOTTle)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Non ascii characters are not sent to db

jparga opened this issue · comments

Non ascii characters are stored in db through py4web form,

Changing recode_unicode=False in line 143 of request/helpers.py seems to solve the problem

recode_unicode = True

Ascii characters entered in the form become non-ascii?
Could you povide more details, please?

No, non ascii characters cause an error and the value is not stored in the db.
If the record is edited from an existing one then the value of the fields with no ascii characters is set to None.
If there is a IS_NOT_EMPTY() validator then the error 'Enter a value' rises.
This is the explanation of the error.
https://groups.google.com/g/py4web/c/s5W-8zgvmoA/m/Fn3mRYwrCQAJ

This is the patched solution:
https://discord.com/channels/836984759535534120/836984759535534125/1006343351190171718

fixed fcb2abe
v0.1.0 on pypi