I have a variable such as title
:
title = "révolution_essentielle"
I could encode and decode it like this for other purposes:
title1 = unicode(title, encoding = "utf-8")
But how do I preserve the Non-English and use it as part of a url string to access the url? For instance, I ideally want https://mainurl.com/révolution_essentielle.html
by concatenating several strings including title
like this:
url = main_url + "/" + title + ".html"
Could anyone kindly show me how to do that? Thanks a bunch!