{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6093","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6093/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6093/comments","events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6093/events","html_url":"https://github.com/bitcoin/bitcoin/pull/6093","id":72413159,"number":6093,"title":"fix WIN32 boost::filesystem::path issues when using special chars for datadir path","user":{"login":"jonasschnelli","id":178464,"avatar_url":"https://avatars.githubusercontent.com/u/178464?v=3","gravatar_id":"","url":"https://api.github.com/users/jonasschnelli","html_url":"https://github.com/jonasschnelli","followers_url":"https://api.github.com/users/jonasschnelli/followers","following_url":"https://api.github.com/users/jonasschnelli/following{/other_user}","gists_url":"https://api.github.com/users/jonasschnelli/gists{/gist_id}","starred_url":"https://api.github.com/users/jonasschnelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonasschnelli/subscriptions","organizations_url":"https://api.github.com/users/jonasschnelli/orgs","repos_url":"https://api.github.com/users/jonasschnelli/repos","events_url":"https://api.github.com/users/jonasschnelli/events{/privacy}","received_events_url":"https://api.github.com/users/jonasschnelli/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bitcoin/bitcoin/labels/Bug","name":"Bug","color":"FBBAAB"},{"url":"https://api.github.com/repos/bitcoin/bitcoin/labels/Windows","name":"Windows","color":"880000"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/bitcoin/bitcoin/milestones/14","html_url":"https://github.com/bitcoin/bitcoin/milestones/0.10.0","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/milestones/14/labels","id":505738,"number":14,"title":"0.10.0","description":"","creator":{"login":"laanwj","id":126646,"avatar_url":"https://avatars.githubusercontent.com/u/126646?v=3","gravatar_id":"","url":"https://api.github.com/users/laanwj","html_url":"https://github.com/laanwj","followers_url":"https://api.github.com/users/laanwj/followers","following_url":"https://api.github.com/users/laanwj/following{/other_user}","gists_url":"https://api.github.com/users/laanwj/gists{/gist_id}","starred_url":"https://api.github.com/users/laanwj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laanwj/subscriptions","organizations_url":"https://api.github.com/users/laanwj/orgs","repos_url":"https://api.github.com/users/laanwj/repos","events_url":"https://api.github.com/users/laanwj/events{/privacy}","received_events_url":"https://api.github.com/users/laanwj/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":133,"state":"open","created_at":"2013-12-05T10:34:42Z","updated_at":"2015-05-01T12:36:50Z","due_on":null,"closed_at":null},"comments":18,"created_at":"2015-05-01T11:32:45Z","updated_at":"2015-05-04T15:52:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/6093","html_url":"https://github.com/bitcoin/bitcoin/pull/6093","diff_url":"https://github.com/bitcoin/bitcoin/pull/6093.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/6093.patch"},"body":"fixes https://github.com/bitcoin/bitcoin/issues/6078\r\nMeant for 0.11 branch."},"comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments/98763242","html_url":"https://github.com/bitcoin/bitcoin/pull/6093#issuecomment-98763242","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/6093","id":98763242,"user":{"login":"dexX7","id":5836089,"avatar_url":"https://avatars.githubusercontent.com/u/5836089?v=3","gravatar_id":"","url":"https://api.github.com/users/dexX7","html_url":"https://github.com/dexX7","followers_url":"https://api.github.com/users/dexX7/followers","following_url":"https://api.github.com/users/dexX7/following{/other_user}","gists_url":"https://api.github.com/users/dexX7/gists{/gist_id}","starred_url":"https://api.github.com/users/dexX7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dexX7/subscriptions","organizations_url":"https://api.github.com/users/dexX7/orgs","repos_url":"https://api.github.com/users/dexX7/repos","events_url":"https://api.github.com/users/dexX7/events{/privacy}","received_events_url":"https://api.github.com/users/dexX7/received_events","type":"User","site_admin":false},"created_at":"2015-05-04T15:52:08Z","updated_at":"2015-05-04T15:52:08Z","body":"> @laanwj: Question: at least for the 0.10 branch, can you code this so that it doesn't affect behavior on non-Windows? \r\n\r\nIs this the case? [Travis is happy](https://travis-ci.org/dexX7/bitcoin/builds/60885645) with the change applied on top of 0.10.1, and the bad-environment test passes as well. It does not bring back #3136, and at least to my understanding, it should restore the behavior of pre-0.10, but without the multithreading-deinitialization issue. *But please don't give my understanding much weight here.* \r\n\r\nAll this is based on the assumption that [path::codecvt()](https://github.com/boostorg/filesystem/blob/boost-1.55.0/src/path.cpp#L884-L914) is called via `boost::filesystem::path` at some point, which then undergoes a [similar path](https://github.com/boostorg/filesystem/blob/boost-1.55.0/src/path.cpp#L792-L873) as `path::imbue()` does, to return the original locale.\r\n\r\n> @theuni: Thanks for sticking with this and explaining the issue well.\r\n\r\nIt's the least I can do, given that my fix for #3136 (deinitialization issue), and the follow up #5950 (bad environment handling), ultimately led in this situation.\r\n\r\n> We could just add a quick unit-test to add a subdir inside the current profile and touch a file in there.\r\n\r\nHaving more tests for this would be incredibly useful.\r\n\r\nThere might be a twist though: the unit tests (via [TestingSetup](https://github.com/bitcoin/bitcoin/blob/0.10/src/test/test_bitcoin.cpp#L41-L43)) appear to use `pathTemp = GetTempPath() / ...` for the temporary test datadir, and this probably throws, even before any tests are executed, if `path` can't handle paths inside the current profile, because `GetTempPath()` returns `\\Users\\{username}\\AppData\\Local\\Temp` as per default on Windows Vista+.\r\n\r\nJust brainstorming on this: what I [tested manually](https://gist.github.com/dexX7/7394a947b29c7d84c710#file-results_bitcoind-log) might be wrapped into a Python test, which starts and stops nodes, using a bunch of datadirs with \"exotic\" characters. Unfortunally I'm not sure, which test data could be used for it, given that, appearingly, the system's localization plays a significant role here (e.g. `œ™€®` passes on my system, while `юзза`, which seems to work fine for the original poster of #6078, doesn't).\r\n\r\nTackling this from another perspective: ideally there would also be some form of mitigation in the context of `GetDataDir()` ([create datadir] and related), to a) catch potential exceptions, and b) provide some form of guidance for the user, or more telling messages, if it actually happens."}}