Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with UTF-8 encoding #47

Open
noahendtner opened this issue Mar 4, 2021 · 4 comments
Open

Problems with UTF-8 encoding #47

noahendtner opened this issue Mar 4, 2021 · 4 comments

Comments

@noahendtner
Copy link

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.

@frankosterfeld
Copy link

Do you have an example feed? I can't reproduce this, testing with a few German RSS feeds, which all use UTF-8.

@frankosterfeld
Copy link

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.

@sgehrman
Copy link

sgehrman commented Sep 9, 2021

nyt

@Persie0
Copy link

Persie0 commented Feb 6, 2022

you can solve this by adding

import 'dart:convert' show utf8;
...
your_correct_string = utf8.decode(your_string.runes.toList());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants