webfeed
webfeed copied to clipboard
Problems with UTF-8 encoding
I built an RSSReader to get some news from a german news television shows RSS feed, and since its german it has some special characters in it (äüöÄÜÖ) and those get picked up wrong by the UTF-8 encoding:
All of the german special characters get somehow replaced by Ä and some garbage cause the translator adds 2 UTS-8 bytes (dez. 131 & 164) behind the 165 byte which indicates the german and some other special characters.
Do you have an example feed? I can't reproduce this, testing with a few German RSS feeds, which all use UTF-8.
Update: I can reproduce this with https://www.tagesschau.de/xml/rss2 (which matches the description above :)). Feed looks correctly UTF-8 encoded, and other than this RSS 2 feed, the RDF feed works fine.
you can solve this by adding
import 'dart:convert' show utf8;
...
your_correct_string = utf8.decode(your_string.runes.toList());