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

Getting wrong encode #7

Closed
globalcircle opened this issue Feb 24, 2016 · 2 comments
Closed

Getting wrong encode #7

globalcircle opened this issue Feb 24, 2016 · 2 comments

Comments

@globalcircle
Copy link

Hey, great job with rss-parser. But i when i try to catch some iso-8.. rss feed the typo isnt correct.. how can i fix this?

@rbren
Copy link
Owner

rbren commented Feb 25, 2016

Are you using parseFile/parseURL? These methods explicitly set the encoding to utf8.

I think you have two options:

  • Read the file/url yourself, and use parseString
  • Change the functions to accept an encoding object (happy to accept a PR)

If you prefer the latter, I think the best way to go is to allow users to pass in a string or an object as the first parameter, e.g.

parseURL('https://www.reddit.com/.rss', callback)

parseURL({url: 'https://www.reddit.com', encoding: 'iso-8'}, callback)

would be equivalent.

@rbren
Copy link
Owner

rbren commented Jun 29, 2016

Marking as fixed - let me know if you're still having trouble.

@rbren rbren closed this as completed Jun 29, 2016
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

2 participants