{"action":"opened","issue":{"url":"https://api.github.com/repos/buruzaemon/natto-py/issues/3","labels_url":"https://api.github.com/repos/buruzaemon/natto-py/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/buruzaemon/natto-py/issues/3/comments","events_url":"https://api.github.com/repos/buruzaemon/natto-py/issues/3/events","html_url":"https://github.com/buruzaemon/natto-py/issues/3","id":57231811,"number":3,"title":"-u / --userdic / userdic option: Path including space char does not work on Windows","user":{"login":"buruzaemon","id":498577,"avatar_url":"https://avatars.githubusercontent.com/u/498577?v=3","gravatar_id":"","url":"https://api.github.com/users/buruzaemon","html_url":"https://github.com/buruzaemon","followers_url":"https://api.github.com/users/buruzaemon/followers","following_url":"https://api.github.com/users/buruzaemon/following{/other_user}","gists_url":"https://api.github.com/users/buruzaemon/gists{/gist_id}","starred_url":"https://api.github.com/users/buruzaemon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buruzaemon/subscriptions","organizations_url":"https://api.github.com/users/buruzaemon/orgs","repos_url":"https://api.github.com/users/buruzaemon/repos","events_url":"https://api.github.com/users/buruzaemon/events{/privacy}","received_events_url":"https://api.github.com/users/buruzaemon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/buruzaemon/natto-py/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-10T20:28:34Z","updated_at":"2015-02-10T20:28:34Z","closed_at":null,"body":"## Problem Description ##\r\n\r\nThe [MeCab 0.996 option flags](http://mecab.googlecode.com/svn/trunk/mecab/doc/mecab.html) ```-u``` / ```--userdic``` / ```user``` for specifying a user-defined dictionary will not work via natto-py when its path is a Windows path including whitespace chars.\r\n\r\n## Steps to reproduce the problem ##\r\n\r\n1. Install MeCab 0.996.exe on Windows XP\r\n2. Install Python 2.7.8\r\n3. Install natto-py 0.0.2\r\n4. Execute the following:\r\n```\r\n#!python\r\nimport natto\r\nimport os\r\n\r\nos.environ['MECAB_PATH']='C:/Program Files/MeCab/bin/libmecab.dll'\r\nos.environ['MECAB_CHARSET']='shift-jis'\r\n\r\nnm = natto.MeCab('-u\"C:\\\\Program Files\\\\MeCab\\\\dic\\\\mydictionary\"')\r\n```\r\n\r\n* Observe that the above code results in the following exception being thrown:\r\n\r\n```\r\n#!python\r\n\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"natto\\api.py\", line 273, in __init__\r\n    raise MeCabError(self._ERROR_INIT % str(verr))\r\nnatto.api.MeCabError: Could not initialize MeCab: unrecognized arguments: Files\\MeCab\\dic\\mydictionary\"\r\n```\r\n\r\n## Expected behavior ##\r\n\r\nThe reference to mecab via natto-py should be successfully instantiated.\r\n\r\nNote that using ```-u``` / ```--userdic``` from the mecab command-line will work by simply surrounding the Windows path with double-quotes.\r\n\r\n```\r\n#!script\r\n\r\nmecab -u\"C:\\Program Files\\MeCab\\dic\\mydictionary\"\r\n```\r\n\r\n## Version, platform, environment details ##\r\n\r\n1. MeCab 0.996.exe\r\n2. Windows XP Professional, Version 2002, Service Pack 3\r\n3. Python 2.7.8\r\n4. natto-py 0.0.2"}}