我有一个这样的字符串: 'hello this is nice\\r\\n\\xc2\\xa0 goodbye' 我需要将此转换为纯utf-8文本。编解码库没有解决这个问题: codecs.unicode_escape_decode(x)[0]
'hello this is nice\r\nÂ\xa0 goodbye' 如何将该字符串转换为干净utf-8文本?
我正在研究转换一些Markdown文本为纯文本。在阅读现有问题后,很明显,最简单的解决方案是使用现有的转换器将Markdown转换为Html,然后将Html转换为纯文本。例如,这个标记"some text “被转换为html
<p>some text <a href="https://somelink.com">click here</a></