{"action":"closed","issue":{"url":"https://api.github.com/repos/hadley/dplyr/issues/1507","repository_url":"https://api.github.com/repos/hadley/dplyr","labels_url":"https://api.github.com/repos/hadley/dplyr/issues/1507/labels{/name}","comments_url":"https://api.github.com/repos/hadley/dplyr/issues/1507/comments","events_url":"https://api.github.com/repos/hadley/dplyr/issues/1507/events","html_url":"https://github.com/hadley/dplyr/issues/1507","id":115026492,"number":1507,"title":"UTF-8 problem with group_by","user":{"login":"YizhouZheng","id":15649295,"avatar_url":"https://avatars.githubusercontent.com/u/15649295?v=3","gravatar_id":"","url":"https://api.github.com/users/YizhouZheng","html_url":"https://github.com/YizhouZheng","followers_url":"https://api.github.com/users/YizhouZheng/followers","following_url":"https://api.github.com/users/YizhouZheng/following{/other_user}","gists_url":"https://api.github.com/users/YizhouZheng/gists{/gist_id}","starred_url":"https://api.github.com/users/YizhouZheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YizhouZheng/subscriptions","organizations_url":"https://api.github.com/users/YizhouZheng/orgs","repos_url":"https://api.github.com/users/YizhouZheng/repos","events_url":"https://api.github.com/users/YizhouZheng/events{/privacy}","received_events_url":"https://api.github.com/users/YizhouZheng/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hadley/dplyr/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/hadley/dplyr/labels/data%20frame","name":"data frame","color":"207de5"}],"state":"closed","locked":false,"assignee":{"login":"romainfrancois","id":2625526,"avatar_url":"https://avatars.githubusercontent.com/u/2625526?v=3","gravatar_id":"","url":"https://api.github.com/users/romainfrancois","html_url":"https://github.com/romainfrancois","followers_url":"https://api.github.com/users/romainfrancois/followers","following_url":"https://api.github.com/users/romainfrancois/following{/other_user}","gists_url":"https://api.github.com/users/romainfrancois/gists{/gist_id}","starred_url":"https://api.github.com/users/romainfrancois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romainfrancois/subscriptions","organizations_url":"https://api.github.com/users/romainfrancois/orgs","repos_url":"https://api.github.com/users/romainfrancois/repos","events_url":"https://api.github.com/users/romainfrancois/events{/privacy}","received_events_url":"https://api.github.com/users/romainfrancois/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/hadley/dplyr/milestones/8","html_url":"https://github.com/hadley/dplyr/milestones/0.5","labels_url":"https://api.github.com/repos/hadley/dplyr/milestones/8/labels","id":766580,"number":8,"title":"0.5","description":"","creator":{"login":"hadley","id":4196,"avatar_url":"https://avatars.githubusercontent.com/u/4196?v=3","gravatar_id":"","url":"https://api.github.com/users/hadley","html_url":"https://github.com/hadley","followers_url":"https://api.github.com/users/hadley/followers","following_url":"https://api.github.com/users/hadley/following{/other_user}","gists_url":"https://api.github.com/users/hadley/gists{/gist_id}","starred_url":"https://api.github.com/users/hadley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadley/subscriptions","organizations_url":"https://api.github.com/users/hadley/orgs","repos_url":"https://api.github.com/users/hadley/repos","events_url":"https://api.github.com/users/hadley/events{/privacy}","received_events_url":"https://api.github.com/users/hadley/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":240,"state":"open","created_at":"2014-08-26T20:16:29Z","updated_at":"2016-05-01T10:52:59Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2015-11-04T10:55:12Z","updated_at":"2016-05-01T10:52:59Z","closed_at":"2016-05-01T10:52:59Z","body":"I found the UTF-8  problem still alive in group_by(). (Using the newest dev version. 0.4.3.9000)\r\n\r\nSee below for reproducible code.\r\n\r\nCreate a dataframe and make the colnames UTF-8.\r\n\r\n```r\r\nlibrary(dplyr)\r\ndf <- data.frame(测试=1:3, Eng=2:4)\r\nnames(df) <- enc2utf8(names(df))\r\nEncoding(names(df))\r\n[1] \"UTF-8\" \"unknown\"\r\n```\r\nselect() works.\r\n\r\n```r\r\ndf %>% select(测试) \r\n测试\r\n1 1\r\n2 2\r\n3 3\r\n```\r\ngroup_by doesn't work.\r\n\r\n```r\r\ndf %>% group_by(测试) #group_by won't work\r\nError: unknown column '测试'\r\n```\r\n\r\ngroup_by work well under native encoding.\r\n\r\n```r\r\nnames(df) <- enc2native(names(df))\r\ndf %>% select(测试)\r\n测试\r\n1 1\r\n2 2\r\n3 3\r\n\r\ndf %>% group_by(测试)\r\nSource: local data frame [3 x 2]\r\nGroups: 测试 [3]\r\n测试 Eng\r\n(int) (int)\r\n1 1 2\r\n2 2 3\r\n3 3 4\r\n```"}}