Bug #3535: Error during failsafe response: "\xCB" from ASCII-8BIT to UTF-8
http://redmine.ruby-lang.org/issues/show/3535

Author: Leandro Santos
Status: Open, Priority: Normal
ruby -v: ruby 1.9.2dev (2010-07-02 revision 28524) [x86_64-darwin10.4.0]

I was running a small rails app and I got that error because of a character inside one class file. Below is the stack trace:

 /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/activesupport-3.0.0.beta4/lib/active_support/buffered_logger.rb:104:in `write'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/activesupport-3.0.0.beta4/lib/active_support/buffered_logger.rb:104:in `block in flush'
  <internal:prelude>:10:in `synchronize'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/activesupport-3.0.0.beta4/lib/active_support/buffered_logger.rb:101:in `flush'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/activesupport-3.0.0.beta4/lib/active_support/buffered_logger.rb:121:in `auto_flush'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/activesupport-3.0.0.beta4/lib/active_support/buffered_logger.rb:66:in `add'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/activesupport-3.0.0.beta4/lib/active_support/buffered_logger.rb:77:in `fatal'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/actionpack-3.0.0.beta4/lib/action_dispatch/middleware/show_exceptions.rb:139:in `block in log_error'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/activesupport-3.0.0.beta4/lib/active_support/deprecation/reporting.rb:15:in `silence'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/actionpack-3.0.0.beta4/lib/action_dispatch/middleware/show_exceptions.rb:135:in `log_error'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/actionpack-3.0.0.beta4/lib/action_dispatch/middleware/show_exceptions.rb:66:in `render_exception'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/actionpack-3.0.0.beta4/lib/action_dispatch/middleware/show_exceptions.rb:61:in `rescue in call'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/actionpack-3.0.0.beta4/lib/action_dispatch/middleware/show_exceptions.rb:48:in `call'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/railties-3.0.0.beta4/lib/rails/rack/logger.rb:14:in `call'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/rack-1.1.0/lib/rack/runtime.rb:17:in `call'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/activesupport-3.0.0.beta4/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/rack-1.1.0/lib/rack/lock.rb:11:in `block in call'
  <internal:prelude>:10:in `synchronize'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/rack-1.1.0/lib/rack/lock.rb:11:in `call'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/actionpack-3.0.0.beta4/lib/action_dispatch/middleware/static.rb:30:in `call'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/railties-3.0.0.beta4/lib/rails/application.rb:145:in `call'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/railties-3.0.0.beta4/lib/rails/application.rb:81:in `method_missing'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/railties-3.0.0.beta4/lib/rails/rack/log_tailer.rb:15:in `call'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call'
  /Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in `service'
  /Users/lsantos/.rvm/rubies/ruby-1.9.2-rc1/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
  /Users/lsantos/.rvm/rubies/ruby-1.9.2-rc1/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
  /Users/lsantos/.rvm/rubies/ruby-1.9.2-rc1/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
[2010-07-04 14:12:55] ERROR Encoding::UndefinedConversionError: "\xCB" from ASCII-8BIT to UTF-8
	/Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/activesupport-3.0.0.beta4/lib/active_support/buffered_logger.rb:104:in `write'
	/Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/activesupport-3.0.0.beta4/lib/active_support/buffered_logger.rb:104:in `block in flush'
	<internal:prelude>:10:in `synchronize'
	/Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/activesupport-3.0.0.beta4/lib/active_support/buffered_logger.rb:101:in `flush'
	/Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/railties-3.0.0.beta4/lib/rails/log_subscriber.rb:84:in `each'
	/Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/railties-3.0.0.beta4/lib/rails/log_subscriber.rb:84:in `flush_all!'
	/Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/railties-3.0.0.beta4/lib/rails/rack/logger.rb:30:in `after_dispatch'
	/Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/railties-3.0.0.beta4/lib/rails/rack/logger.rb:16:in `call'
	/Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/rack-1.1.0/lib/rack/runtime.rb:17:in `call'
	/Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/activesupport-3.0.0.beta4/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
	/Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/rack-1.1.0/lib/rack/lock.rb:11:in `block in call'
	<internal:prelude>:10:in `synchronize'
	/Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/rack-1.1.0/lib/rack/lock.rb:11:in `call'
	/Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/actionpack-3.0.0.beta4/lib/action_dispatch/middleware/static.rb:30:in `call'
	/Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/railties-3.0.0.beta4/lib/rails/application.rb:145:in `call'
	/Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/railties-3.0.0.beta4/lib/rails/application.rb:81:in `method_missing'
	/Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/railties-3.0.0.beta4/lib/rails/rack/log_tailer.rb:15:in `call'
	/Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call'
	/Users/lsantos/.rvm/gems/ruby-1.9.2-rc1@rails3/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in `service'
	/Users/lsantos/.rvm/rubies/ruby-1.9.2-rc1/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
	/Users/lsantos/.rvm/rubies/ruby-1.9.2-rc1/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
	/Users/lsantos/.rvm/rubies/ruby-1.9.2-rc1/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

Attached is the source code of the app just in case it is needed. The offending file seems to be messages_controller.rb and the character is ??.


----------------------------------------
http://redmine.ruby-lang.org