{"action":"created","issue":{"url":"https://api.github.com/repos/petdance/ack2/issues/565","labels_url":"https://api.github.com/repos/petdance/ack2/issues/565/labels{/name}","comments_url":"https://api.github.com/repos/petdance/ack2/issues/565/comments","events_url":"https://api.github.com/repos/petdance/ack2/issues/565/events","html_url":"https://github.com/petdance/ack2/issues/565","id":98219627,"number":565,"title":"Word boundaries with non-ASCII character","user":{"login":"teoric","id":876815,"avatar_url":"https://avatars.githubusercontent.com/u/876815?v=3","gravatar_id":"","url":"https://api.github.com/users/teoric","html_url":"https://github.com/teoric","followers_url":"https://api.github.com/users/teoric/followers","following_url":"https://api.github.com/users/teoric/following{/other_user}","gists_url":"https://api.github.com/users/teoric/gists{/gist_id}","starred_url":"https://api.github.com/users/teoric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teoric/subscriptions","organizations_url":"https://api.github.com/users/teoric/orgs","repos_url":"https://api.github.com/users/teoric/repos","events_url":"https://api.github.com/users/teoric/events{/privacy}","received_events_url":"https://api.github.com/users/teoric/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-30T17:17:41Z","updated_at":"2015-07-30T18:57:45Z","closed_at":null,"body":"I am trying to look for the presence of a word containing non-ASCII characters, and this is not possible:\r\n\r\n    ack '\\büber'\r\n    ack -w über\r\n\r\nThe first should find me exactly the lines containing a word *starting with* `über`, the second should find exactly the lines where `über` is a *single word*, shouldn't it? Texts are UTF-8, and dropping the boundaries gives thousands of results, as does searching with `pcregrep`.\r\n\r\nThe first line also returns lines containing words that *contain* über (such as `darüberhinaus`) and the second one also those containing words *ending in* `über` (such as `darüber`), which seems to suggest that the boundary matches before `ü`, i.e. `ü` is not counted as a word character (but should be).\r\n\r\nLocale is set to \"de_DE.UTF-8\", but unsetting it does not change anything.\r\n\r\n(ack 2.12 / perl 5.18.2 with Ubuntu 14.04, and ack 2.14 / perl 5.22 on Mac OS X 10.11)\r\n\r\nMatches can be made correct, as far as I can see, adding \r\n\r\n  use feature unicode_strings; # optional?\r\n  use re \"/u\";\r\n\r\nSwitching to Unicode processing would probably also help to attack #484 .\r\n\r\nto the beginning of the ack script (probably also if adding to the library). Maybe this can be made an option for non-ASCII-ists?"},"comment":{"url":"https://api.github.com/repos/petdance/ack2/issues/comments/126438989","html_url":"https://github.com/petdance/ack2/issues/565#issuecomment-126438989","issue_url":"https://api.github.com/repos/petdance/ack2/issues/565","id":126438989,"user":{"login":"teoric","id":876815,"avatar_url":"https://avatars.githubusercontent.com/u/876815?v=3","gravatar_id":"","url":"https://api.github.com/users/teoric","html_url":"https://github.com/teoric","followers_url":"https://api.github.com/users/teoric/followers","following_url":"https://api.github.com/users/teoric/following{/other_user}","gists_url":"https://api.github.com/users/teoric/gists{/gist_id}","starred_url":"https://api.github.com/users/teoric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teoric/subscriptions","organizations_url":"https://api.github.com/users/teoric/orgs","repos_url":"https://api.github.com/users/teoric/repos","events_url":"https://api.github.com/users/teoric/events{/privacy}","received_events_url":"https://api.github.com/users/teoric/received_events","type":"User","site_admin":false},"created_at":"2015-07-30T18:57:45Z","updated_at":"2015-07-30T18:57:45Z","body":"Thank you very much for this solution!  Maybe just mentioning `(?u)` in the documentation would be enought.\r\n\r\nRegarding the statement on \"natural language\", I disagree. Note that most source code nowadays is not confined to ASCII any more. Looking "}}