{"action":"created","issue":{"url":"https://api.github.com/repos/nuxt-community/feed-module/issues/8","repository_url":"https://api.github.com/repos/nuxt-community/feed-module","labels_url":"https://api.github.com/repos/nuxt-community/feed-module/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/nuxt-community/feed-module/issues/8/comments","events_url":"https://api.github.com/repos/nuxt-community/feed-module/issues/8/events","html_url":"https://github.com/nuxt-community/feed-module/issues/8","id":367101558,"node_id":"MDU6SXNzdWUzNjcxMDE1NTg=","number":8,"title":"utf-8 encoding and response headers","user":{"login":"Youdaman","id":287330,"node_id":"MDQ6VXNlcjI4NzMzMA==","avatar_url":"https://avatars0.githubusercontent.com/u/287330?v=4","gravatar_id":"","url":"https://api.github.com/users/Youdaman","html_url":"https://github.com/Youdaman","followers_url":"https://api.github.com/users/Youdaman/followers","following_url":"https://api.github.com/users/Youdaman/following{/other_user}","gists_url":"https://api.github.com/users/Youdaman/gists{/gist_id}","starred_url":"https://api.github.com/users/Youdaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Youdaman/subscriptions","organizations_url":"https://api.github.com/users/Youdaman/orgs","repos_url":"https://api.github.com/users/Youdaman/repos","events_url":"https://api.github.com/users/Youdaman/events{/privacy}","received_events_url":"https://api.github.com/users/Youdaman/received_events","type":"User","site_admin":false},"labels":[{"id":901802954,"node_id":"MDU6TGFiZWw5MDE4MDI5NTQ=","url":"https://api.github.com/repos/nuxt-community/feed-module/labels/invalid","name":"invalid","color":"e4e669","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-05T08:02:19Z","updated_at":"2019-01-02T15:11:19Z","closed_at":"2018-10-05T10:48:54Z","author_association":"NONE","body":"I noticed when comparing the output of the plugin pulling JSON from a WordPress site vs the WP site's own RSS feed that maybe the encoding and headers aren't 100% correct.\r\n\r\nFor example `[…]` (the \"read more\" link) in the WordPress feed display as `[â€¦]` with this plugin.\r\n\r\nSo I looked at the response headers and I see that WP uses `content-type: application/rss+xml; charset=UTF-8` while this plugin uses `Content-Type: application/rss+xml` -- the charset part is missing.\r\n\r\nAlso, the feed with this plugin shows up as a standard html page not an xml document -- I'm using a colour inverter with Chrome https://chrome.google.com/webstore/detail/dark-reader/eimadpbcbfnmbkopoojfekhnkhdbieeh?hl=en and the feed from this plugin shows up with inverted colours vs the WP feed which shows up as black text on a white background, so this gave me the clue that the browser might be receiving this plugin's feed as HTML not RSS/XML. "},"comment":{"url":"https://api.github.com/repos/nuxt-community/feed-module/issues/comments/450888265","html_url":"https://github.com/nuxt-community/feed-module/issues/8#issuecomment-450888265","issue_url":"https://api.github.com/repos/nuxt-community/feed-module/issues/8","id":450888265,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDg4ODI2NQ==","user":{"login":"zzzzbw","id":10753805,"node_id":"MDQ6VXNlcjEwNzUzODA1","avatar_url":"https://avatars1.githubusercontent.com/u/10753805?v=4","gravatar_id":"","url":"https://api.github.com/users/zzzzbw","html_url":"https://github.com/zzzzbw","followers_url":"https://api.github.com/users/zzzzbw/followers","following_url":"https://api.github.com/users/zzzzbw/following{/other_user}","gists_url":"https://api.github.com/users/zzzzbw/gists{/gist_id}","starred_url":"https://api.github.com/users/zzzzbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzzzbw/subscriptions","organizations_url":"https://api.github.com/users/zzzzbw/orgs","repos_url":"https://api.github.com/users/zzzzbw/repos","events_url":"https://api.github.com/users/zzzzbw/events{/privacy}","received_events_url":"https://api.github.com/users/zzzzbw/received_events","type":"User","site_admin":false},"created_at":"2019-01-02T15:11:19Z","updated_at":"2019-01-02T15:11:19Z","author_association":"NONE","body":"I have the same question in utf-8 encoding.\r\n\r\nAs the saying by @Youdaman ,there is missing `charset=UTF-8` in `Content-Type`. The chinese word in my website will be like below :\r\n![pic](https://i.loli.net/2019/01/02/5c2cd3413236a.png)\r\n\r\nAfter I chage the code in the` .\\node_modules\\@nuxtjs\\feed\\lib\\module.js `:\r\n```javascript\r\nfunction resolveContentType (type) {\r\n  const lookup = {\r\n    rss2: 'application/rss+xml;',\r\n    atom1: 'application/atom+xml;',\r\n    json1: 'application/json;'\r\n  }\r\n  return (lookup.hasOwnProperty(type) ? lookup[type] : 'application/xml;') + ' charset=UTF-8;'\r\n}\r\n```\r\nThe xml page look fine because there is `charset=UTF-8;` in the `Content-Type`.\r\n\r\n![pic](https://i.loli.net/2019/01/02/5c2cd46d9c919.png)\r\n\r\n![pic](https://i.loli.net/2019/01/02/5c2cd40c734fd.png)\r\n\r\nHope can fix it ,thx!\r\n\r\n\r\n"}}
{"actor":{"display_login":"zzzzbw"}}