Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding: nvalid byte sequence in US-ASCII on really UTF string #49

Open
kalabiyau opened this issue Nov 23, 2011 · 2 comments
Open

Encoding: nvalid byte sequence in US-ASCII on really UTF string #49

kalabiyau opened this issue Nov 23, 2011 · 2 comments
Labels

Comments

@kalabiyau
Copy link

Invoice.last
Invoice Load (0.4ms)  SELECT "invoices".* FROM "invoices" ORDER BY "invoices"."id" DESC LIMIT 1
Hirb Error: invalid byte sequence in US-ASCII
   /.rvm/gems/ruby-1.9.3-p0/gems/hirb-0.5.0/lib/hirb/helpers/table.rb:333:in `gsub'

but

Invoice.last.attributes.each {|k,v| p "#{k} => #{v ? v : "nil"} => #{v.encoding if v.is_a?(String)}"}
  Invoice Load (0.3ms)  SELECT "invoices".* FROM "invoices" ORDER BY "invoices"."id" DESC LIMIT 1
"id => 143 => "
"name => nil => "
"document => B7_1_Территория_игр_20111107.pdf => UTF-8"
"checked_at => nil => "
"checked_by => nil => "
"upload_date => 2011-01-23 15:26:08 +0300 => "
"tenant_id => nil => "
"created_at => 2011-11-23 15:26:08 +0400 => "
"updated_at => 2011-11-23 15:26:08 +0400 => "
=> {"id"=>143, "name"=>nil, "document"=>"B7_1_Территория_игр_20111107.pdf", "checked_at"=>nil, "checked_by"=>nil, "upload_date"=>Sun, 23 Jan 2011 15:26:08 MSK +03:00, "tenant_id"=>nil, "created_at"=>Wed, 23 Nov 2011 15:26:08 MSK +04:00, "updated_at"=>Wed, 23 Nov 2011 15:26:08 MSK +04:00}
@kalabiyau
Copy link
Author

With plain irb all is ok.

@cldwalker
Copy link
Owner

Don't have time or knowledge to look into this. Leaving open for anyone willing and able.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants