{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/rocksdb/issues/3408","repository_url":"https://api.github.com/repos/facebook/rocksdb","labels_url":"https://api.github.com/repos/facebook/rocksdb/issues/3408/labels{/name}","comments_url":"https://api.github.com/repos/facebook/rocksdb/issues/3408/comments","events_url":"https://api.github.com/repos/facebook/rocksdb/issues/3408/events","html_url":"https://github.com/facebook/rocksdb/issues/3408","id":291542138,"number":3408,"title":"Opening filenames with Unicode on Windows not possible","user":{"login":"chrisdone","id":11019,"avatar_url":"https://avatars3.githubusercontent.com/u/11019?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisdone","html_url":"https://github.com/chrisdone","followers_url":"https://api.github.com/users/chrisdone/followers","following_url":"https://api.github.com/users/chrisdone/following{/other_user}","gists_url":"https://api.github.com/users/chrisdone/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisdone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisdone/subscriptions","organizations_url":"https://api.github.com/users/chrisdone/orgs","repos_url":"https://api.github.com/users/chrisdone/repos","events_url":"https://api.github.com/users/chrisdone/events{/privacy}","received_events_url":"https://api.github.com/users/chrisdone/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"miasantreble","id":12212793,"avatar_url":"https://avatars3.githubusercontent.com/u/12212793?v=4","gravatar_id":"","url":"https://api.github.com/users/miasantreble","html_url":"https://github.com/miasantreble","followers_url":"https://api.github.com/users/miasantreble/followers","following_url":"https://api.github.com/users/miasantreble/following{/other_user}","gists_url":"https://api.github.com/users/miasantreble/gists{/gist_id}","starred_url":"https://api.github.com/users/miasantreble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miasantreble/subscriptions","organizations_url":"https://api.github.com/users/miasantreble/orgs","repos_url":"https://api.github.com/users/miasantreble/repos","events_url":"https://api.github.com/users/miasantreble/events{/privacy}","received_events_url":"https://api.github.com/users/miasantreble/received_events","type":"User","site_admin":false},"assignees":[{"login":"miasantreble","id":12212793,"avatar_url":"https://avatars3.githubusercontent.com/u/12212793?v=4","gravatar_id":"","url":"https://api.github.com/users/miasantreble","html_url":"https://github.com/miasantreble","followers_url":"https://api.github.com/users/miasantreble/followers","following_url":"https://api.github.com/users/miasantreble/following{/other_user}","gists_url":"https://api.github.com/users/miasantreble/gists{/gist_id}","starred_url":"https://api.github.com/users/miasantreble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miasantreble/subscriptions","organizations_url":"https://api.github.com/users/miasantreble/orgs","repos_url":"https://api.github.com/users/miasantreble/repos","events_url":"https://api.github.com/users/miasantreble/events{/privacy}","received_events_url":"https://api.github.com/users/miasantreble/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-01-25T11:45:58Z","updated_at":"2018-02-05T09:59:37Z","closed_at":null,"author_association":"NONE","body":"* The method [`DB::Open`](https://github.com/facebook/rocksdb/blob/master/db/db_impl_open.cc#L1002) actually [calls `createDirIfMissing`](https://github.com/facebook/rocksdb/blob/master/db/db_impl_open.cc#L1002).\r\n* That in turn calls [`CreateDir`](https://github.com/facebook/rocksdb/blob/master/port/win/env_win.cc#L4310) from `port/win/env_win.cc`.\r\n* Finally, that in turn [calls `_mkdir`](https://github.com/facebook/rocksdb/blob/master/port/win/env_win.cc#L434), which is from `Direct.h` and has this type: `int _mkdir(const char* pathname)`.\r\n* To properly support Unicode on Windows you typically use a wide char (`wchar_t` or equivalent Win32 API name). The bytes passed into `_mkdir` are interpreted as the current codepage (CP 437, in my case) as multi-byte characters, as opposed to UTF-16 encoded byte pairs.  \r\n\r\nSo I think it would be easier if we could directly expose a function that uses `_wmkdir` which accepts wide-character input. This way you have access to the range that fits in two bytes, rather than the more limited range of CP 437, for example.\r\n\r\nIt's not normal to create a database with non-ASCII, but in our use-case we use absolute paths which may include usernames of people, so that's where the range of unicode support comes in handy.\r\n\r\nIf I open a PR, would it be considered for inclusion?"},"comment":{"url":"https://api.github.com/repos/facebook/rocksdb/issues/comments/363035871","html_url":"https://github.com/facebook/rocksdb/issues/3408#issuecomment-363035871","issue_url":"https://api.github.com/repos/facebook/rocksdb/issues/3408","id":363035871,"user":{"login":"domenkozar","id":126339,"avatar_url":"https://avatars2.githubusercontent.com/u/126339?v=4","gravatar_id":"","url":"https://api.github.com/users/domenkozar","html_url":"https://github.com/domenkozar","followers_url":"https://api.github.com/users/domenkozar/followers","following_url":"https://api.github.com/users/domenkozar/following{/other_user}","gists_url":"https://api.github.com/users/domenkozar/gists{/gist_id}","starred_url":"https://api.github.com/users/domenkozar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenkozar/subscriptions","organizations_url":"https://api.github.com/users/domenkozar/orgs","repos_url":"https://api.github.com/users/domenkozar/repos","events_url":"https://api.github.com/users/domenkozar/events{/privacy}","received_events_url":"https://api.github.com/users/domenkozar/received_events","type":"User","site_admin":false},"created_at":"2018-02-05T09:59:37Z","updated_at":"2018-02-05T09:59:37Z","author_association":"NONE","body":"@maysamyabandeh @yuslepukhin would you accept a patch migrating windows api to unicode types?"}}
{"actor":{"display_login":"domenkozar"}}