Similar Posts

Subscribe
Notify of
1 Answer
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Morpheus2021
1 year ago

You can codecs Use module.

That would look like that in your case:

import codecs

text = “Dein Text mit Sonderzeichen äöü”

encoded_text = codecs.encode(text, ‘iso8859-15’)

print(encoded_text)