Closed ndkv closed 5 years ago
When trying to write an UTF-8 encoded feed to file I get a
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf8' in position 249: ordinal not in range(128)
generated by fd.write(rss) on line 690 in podcast.py.
fd.write(rss)
A solution is to use the open function from the codecs module and specify the encoding explicitly like so
open
codecs
with open(filename, "w", encoding=encoding) as fd: fd.write(rss)
Although this fixes the problem I feel that I'm "holding podgen wrong" and am mishandling my unicode strings somewhere else... any thoughts?
Thank you for fixing this! 🙌🏻
No problem! Thank you for your patience ^^
When trying to write an UTF-8 encoded feed to file I get a
generated by
fd.write(rss)
on line 690 in podcast.py.A solution is to use the
open
function from thecodecs
module and specify the encoding explicitly like soAlthough this fixes the problem I feel that I'm "holding podgen wrong" and am mishandling my unicode strings somewhere else... any thoughts?