As I understand it, Python 3, browsers, and the Anvil database all use Unicode.
But your data source may be using a different encoding. In that case, it would be up to your code to convert that text, from whatever encoding it is in, into Unicode, before storing it in the database.
The good news is, the Python Standard Library does have conversion routines, to convert a stream of bytes into Unicode. You just have to know which encoding you’re starting with.