{"issue":{"user":{"id":44707,"login":"siefca","url":"https://api.github.com/users/siefca","avatar_url":"https://secure.gravatar.com/avatar/0b1838ca3a1231f1ae90a1e424fb9ae7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"0b1838ca3a1231f1ae90a1e424fb9ae7"},"milestone":null,"title":"Broken UTF-8 handling when environment locales are not set","created_at":"2011-07-27T18:20:43Z","labels":[{"name":"category - other","url":"https://api.github.com/repos/rubygems/rubygems/labels/category+-+other","color":"0b02e1"},{"name":"status - accepted","url":"https://api.github.com/repos/rubygems/rubygems/labels/status+-+accepted","color":"02d7e1"},{"name":"type - bug","url":"https://api.github.com/repos/rubygems/rubygems/labels/type+-+bug","color":"e10c02"}],"updated_at":"2011-12-21T16:41:00Z","state":"closed","id":1297796,"closed_at":"2011-08-24T22:02:59Z","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"html_url":"https://github.com/rubygems/rubygems/issues/139","body":"It happens when locale settings from the environment are empty (not even \"`C`\" locale) and someone tries to install some gem that was created using the Rubygems.\r\n\r\nThe major precondition for error to occur is an UTF-8 character in some descriptive field (i.e. `developer`). The locale settings used when building a gem are irrevelant.\r\n\r\nSteps to reproduce:\r\n\r\n    unset LANG\r\n    unset LC_ALL\r\n    unset LC_COLLATE\r\n    unset LC_CTYPE\r\n    unset LC_MESSAGES\r\n    unset LC_MONETARY\r\n    unset LC_NUMERIC\r\n    unset LC_TIME\r\n    gem install i18n-inflector\r\n\r\nThat raises an error:\r\n\r\n    ERROR:  While executing gem ... (ArgumentError)\r\n            invalid byte sequence in US-ASCII\r\n\r\nBut if you try:\r\n\r\n    gem install i18n-inflector --version 2.5.0\r\n\r\nNo error:\r\n\r\n     Fetching: i18n-inflector-2.5.0.gem (100%)\r\n     Successfully installed i18n-inflector-2.5.0\r\n     1 gem installed\r\n\r\nThat's because version 2.5.0 was build in other environment and has UTF-8 characters properly encoded in the `developer` field. There is a difference in specfiles, that might help in tracking cause of this problem. Look at diff for these two packages (newest i18n-inflector and its 2.5.0 version):\r\n\r\n    <   s.version = \"2.5.0\"\r\n    ---\r\n    >   s.version = \"2.5.1\"\r\n    8c8\r\n    <   s.authors = [\"Pawe\\u00C5\\u0082 Wilk\"]\r\n    ---\r\n    >   s.authors = [\"Paweł Wilk\"]\r\n    10c10\r\n    <   s.date = %q{2011-02-23}\r\n    ---\r\n    >   s.date = %q{2011-02-25}\r\n\r\nThat means that the problem can be solved by properly escaping UTF-8 characters **when a gem is built**.\r\n\r\nGrzegorz Kazulak also got this error, in his case when installing `pusher-gem` package.\r\n\r\nThe problem mostly concerns Debian users using English language, who are trying to install some gems globally from root shell, which has unconfigured locale and the given package's author (`developer`) has UTF-8 characters in his/her name.\r\n","number":139,"url":"https://api.github.com/repos/rubygems/rubygems/issues/139","comments":8,"assignee":null},"comment":{"user":{"id":207485,"login":"fcn","url":"https://api.github.com/users/fcn","avatar_url":"https://secure.gravatar.com/avatar/734fa8916c7bffb4c60e84aca16238f9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"734fa8916c7bffb4c60e84aca16238f9"},"created_at":"2011-12-21T16:41:00Z","updated_at":"2011-12-21T16:41:00Z","id":3236042,"body":"this helped me out:\r\nhttp://stackoverflow.com/questions/8252160/invalid-byte-sequence-error-in-normalize-yaml-input-being-thrown","url":"https://api.github.com/repos/rubygems/rubygems/issues/comments/3236042"},"action":"created"}