{"action":"opened","issue":{"url":"https://api.github.com/repos/tidyverse/stringr/issues/143","repository_url":"https://api.github.com/repos/tidyverse/stringr","labels_url":"https://api.github.com/repos/tidyverse/stringr/issues/143/labels{/name}","comments_url":"https://api.github.com/repos/tidyverse/stringr/issues/143/comments","events_url":"https://api.github.com/repos/tidyverse/stringr/issues/143/events","html_url":"https://github.com/tidyverse/stringr/issues/143","id":196985929,"number":143,"title":"str_replace encoding","user":{"login":"danielsjf","id":6696142,"avatar_url":"https://avatars.githubusercontent.com/u/6696142?v=3","gravatar_id":"","url":"https://api.github.com/users/danielsjf","html_url":"https://github.com/danielsjf","followers_url":"https://api.github.com/users/danielsjf/followers","following_url":"https://api.github.com/users/danielsjf/following{/other_user}","gists_url":"https://api.github.com/users/danielsjf/gists{/gist_id}","starred_url":"https://api.github.com/users/danielsjf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielsjf/subscriptions","organizations_url":"https://api.github.com/users/danielsjf/orgs","repos_url":"https://api.github.com/users/danielsjf/repos","events_url":"https://api.github.com/users/danielsjf/events{/privacy}","received_events_url":"https://api.github.com/users/danielsjf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-21T17:13:09Z","updated_at":"2016-12-21T17:13:09Z","closed_at":null,"body":"Using € signs has strange effects in combination with str_replace.\r\n\r\n    text <- '€50$'\r\n    text\r\n    str_replace(text, '50', '100')\r\n    str_replace(text, '[$]', '€')\r\n\r\nIt seems that he changes the encoding:\r\n\r\n    Encoding(text) # 'latin1'\r\n    Encoding(str_replace(text, '50', '100')) # 'UTF-8'\r\n\r\nHowever, resetting the encoding does not solve my problem:\r\n\r\n    replacement <- str_replace(text, '50', '100')\r\n    Encoding(replacement)\r\n    Encoding(replacement) <- 'latin1'\r\n    Encoding(replacement)\r\n    replacement\r\n    "}}
{"actor":{"display_login":"danielsjf"}}