{"action":"opened","issue":{"url":"https://api.github.com/repos/funcoeszz/funcoeszz/issues/179","labels_url":"https://api.github.com/repos/funcoeszz/funcoeszz/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/funcoeszz/funcoeszz/issues/179/comments","events_url":"https://api.github.com/repos/funcoeszz/funcoeszz/issues/179/events","html_url":"https://github.com/funcoeszz/funcoeszz/issues/179","id":60770679,"number":179,"title":"zzascii: caracteres UTF-8 saindo escapados no Ubuntu e Mint.","user":{"login":"itamarnet","id":1585062,"avatar_url":"https://avatars.githubusercontent.com/u/1585062?v=3","gravatar_id":"","url":"https://api.github.com/users/itamarnet","html_url":"https://github.com/itamarnet","followers_url":"https://api.github.com/users/itamarnet/followers","following_url":"https://api.github.com/users/itamarnet/following{/other_user}","gists_url":"https://api.github.com/users/itamarnet/gists{/gist_id}","starred_url":"https://api.github.com/users/itamarnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itamarnet/subscriptions","organizations_url":"https://api.github.com/users/itamarnet/orgs","repos_url":"https://api.github.com/users/itamarnet/repos","events_url":"https://api.github.com/users/itamarnet/events{/privacy}","received_events_url":"https://api.github.com/users/itamarnet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/funcoeszz/funcoeszz/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-12T04:45:00Z","updated_at":"2015-03-12T04:45:00Z","closed_at":null,"body":"As seguintes construções para obtenção de caracteres UTF-8, no Ubuntu e Mint falham.\r\nEm seu lugar aparece codificado em sua forma hexadecimal.\r\n```\r\ncaractere=$(printf \"\\x$hexa\")\r\n```\r\n```\r\ncaractere=$(printf \"\\xC2\\x$hexa\")\r\n```\r\n```\r\nhexa_conversao=$(printf '%X' $((decimal - 64)))\r\ncaractere=$(printf \"\\xC3\\x$hexa_conversao\")\r\n```\r\nObs.: A versão do Mint é baseado no Ubuntu\r\nMas funcionam perfeitamente no Slackware, CentOS e Debian.\r\n\r\n\r\nMas o antigo formato, baseado em awk, funciona em todas as distribuições\r\n```\r\ncaractere=$(awk 'BEGIN { printf \"%c\", '$decimal' }')\r\n```\r\n\r\nDesconfio que tenha relação com o Dash, que é o shell usado no Ubuntu.\r\n\r\nTestes em outras distros poderiam ser mais conclusivas."}}