remove Django usage, instead use encode() function with import unicodedata which is already available