Jeffrey L. Taylor wrote in post #1044767:
Quoting Felipe Pieretti Umpierre <lists@ruby-forum.com>:
Regards,
Everaldo

On Tue, Feb 7, 2012 at 9:10 PM, Felipe Pieretti Umpierre <
I tried, but was the same error.
In the Rails console, pick a model, I use Item here, try this, and show
us the
result.
i = Item.first
i.title # any string field will do
i.title.encoding
The desired value is:

=> #<Encoding:UTF-8>

A couple of other things, I assume you are using Ruby 1.9, correct? And
did
you restart your server after changing database.yml?

Jeffrey
1.9.3-p0 :003 > group = Group.first
Group Load (0.8ms) SELECT `groups`.* FROM `groups` LIMIT 1
=> #<Group id: 1, name: "Felipe", description: "ahsidaus", created_at:
"2012-02-08 22:32:26", updated_at: "2012-02-08 22:32:26">
1.9.3-p0 :004 > group.description
=> "ahsidaus"
1.9.3-p0 :005 > group.description.encoding
=> #<Encoding:ASCII-8BIT>

My encoding is different...

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 9 of 11 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedFeb 7, '12 at 2:21a
activeFeb 14, '12 at 12:59a
posts11
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase