{"action":"created","issue":{"url":"https://api.github.com/repos/zeit/hyper/issues/607","repository_url":"https://api.github.com/repos/zeit/hyper","labels_url":"https://api.github.com/repos/zeit/hyper/issues/607/labels{/name}","comments_url":"https://api.github.com/repos/zeit/hyper/issues/607/comments","events_url":"https://api.github.com/repos/zeit/hyper/issues/607/events","html_url":"https://github.com/zeit/hyper/issues/607","id":170551713,"number":607,"title":"LANG and LC_CTYPE env variables cause many issues with unicode chars","user":{"login":"lordgiotto","id":5115382,"avatar_url":"https://avatars.githubusercontent.com/u/5115382?v=3","gravatar_id":"","url":"https://api.github.com/users/lordgiotto","html_url":"https://github.com/lordgiotto","followers_url":"https://api.github.com/users/lordgiotto/followers","following_url":"https://api.github.com/users/lordgiotto/following{/other_user}","gists_url":"https://api.github.com/users/lordgiotto/gists{/gist_id}","starred_url":"https://api.github.com/users/lordgiotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordgiotto/subscriptions","organizations_url":"https://api.github.com/users/lordgiotto/orgs","repos_url":"https://api.github.com/users/lordgiotto/repos","events_url":"https://api.github.com/users/lordgiotto/events{/privacy}","received_events_url":"https://api.github.com/users/lordgiotto/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zeit/hyper/labels/Status:%20Help%20Wanted","name":"Status: Help Wanted","color":"72F4A6"},{"url":"https://api.github.com/repos/zeit/hyper/labels/Type:%20Bug","name":"Type: Bug","color":"ee0701"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-11T00:57:47Z","updated_at":"2016-10-27T17:32:45Z","closed_at":null,"body":"Hyperterm sets LANG variable in [`app/session.js`](https://github.com/zeit/hyperterm/blob/master/app/session.js#L30), but the way we are doing it creates some problems. \r\n\r\nSince LC_CTYPE inherits from LANG variable, if the locale name returned by app.getLocale() is not an XPG syntax described by gnu.org [here](https://www.gnu.org/software/libc/manual/html_node/Locale-Names.html) (`LANGUAGE_TERRITORY.CHARSET`) and it's not found in locales list `locale -a`, shell will fail with some unicode special chars, causing issues like #183, #597, #441 and probably #589.\r\n\r\nI also noticed that, if locale is not set correctly like described above, alt key is used as metakey, despite hterm 'alt-sends-what' is set to 'browser-key' [here](https://github.com/zeit/hyperterm/blob/master/lib/components/term.js#L40).\r\n\r\nA temporary workaround is to manually set the right locale for you in your `.bashrc`/`.zshrc`: for me it's `export LANG=it_IT.UTF-8`.\r\n\r\nHope it helps 😄 "},"comment":{"url":"https://api.github.com/repos/zeit/hyper/issues/comments/256715191","html_url":"https://github.com/zeit/hyper/issues/607#issuecomment-256715191","issue_url":"https://api.github.com/repos/zeit/hyper/issues/607","id":256715191,"user":{"login":"Arttse","id":7123950,"avatar_url":"https://avatars.githubusercontent.com/u/7123950?v=3","gravatar_id":"","url":"https://api.github.com/users/Arttse","html_url":"https://github.com/Arttse","followers_url":"https://api.github.com/users/Arttse/followers","following_url":"https://api.github.com/users/Arttse/following{/other_user}","gists_url":"https://api.github.com/users/Arttse/gists{/gist_id}","starred_url":"https://api.github.com/users/Arttse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arttse/subscriptions","organizations_url":"https://api.github.com/users/Arttse/orgs","repos_url":"https://api.github.com/users/Arttse/repos","events_url":"https://api.github.com/users/Arttse/events{/privacy}","received_events_url":"https://api.github.com/users/Arttse/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T17:32:45Z","updated_at":"2016-10-27T17:32:45Z","body":"> A temporary workaround is to manually set the right locale for you in your .bashrc/.zshrc: for me it's export LANG=it_IT.UTF-8.\r\n\r\nNot fully worked for me with locale `ru_RU`. \r\nHyper version `0.8.3`.\r\n\r\nI checked the locale:\r\n```sh\r\n$ locale\r\nlocale: Cannot set LC_CTYPE to default locale: No such file or directory\r\nlocale: ?????????? ?????????? LC_ALL ? ?????? ?? ?????????.: ??? ?????? ????? ??? ????????\r\nLANG=ru_RU.UTF-8\r\nLANGUAGE=ru_RU\r\nLC_CTYPE=ru.UTF-8\r\nLC_NUMERIC=\"ru_RU.UTF-8\"\r\nLC_TIME=\"ru_RU.UTF-8\"\r\nLC_COLLATE=\"ru_RU.UTF-8\"\r\nLC_MONETARY=\"ru_RU.UTF-8\"\r\nLC_MESSAGES=\"ru_RU.UTF-8\"\r\nLC_PAPER=\"ru_RU.UTF-8\"\r\nLC_NAME=\"ru_RU.UTF-8\"\r\nLC_ADDRESS=\"ru_RU.UTF-8\"\r\nLC_TELEPHONE=\"ru_RU.UTF-8\"\r\nLC_MEASUREMENT=\"ru_RU.UTF-8\"\r\nLC_IDENTIFICATION=\"ru_RU.UTF-8\"\r\nLC_ALL=\r\n```\r\n\r\nI saw that the variable `LC_CTYPE` is set incorrectly.\r\n\r\nSo for me, a working version was like this:\r\n```sh\r\nexport LANG=ru_RU.UTF-8\r\nexport LC_CTYPE=ru_RU.UTF-8\r\n```\r\nPut this to your `.bashrc` or `.zshrc`"}}
{"actor":{"display_login":"Arttse"}}