Hi Craig,

Thanks for the links.
The config.encoding setting is a bit controversial to me (docs say it's 
"application wide", comment says it's for templates only).

In any case I have all the encodings possible set to UTF-8 
(Encoding.default_internal, Encoding.default_external, __ENCODING__ of most 
files).

For now I workarounded  this issues with the @tenderlove's commit.
https://github.com/rails/rails/issues/3957#issuecomment-3118648

But still I don't quite understand where ASCII could possibly come from when 
everything seems to be UTF-8 :(

Cheers,
Dima.

On 13/12/2011, at 4:53 PM, Craig Read wrote:

> Hi Dima,
> 
> I'm guessing you probably found these by now, but I found a couple of other 
> issues logged against this:
> 
> https://github.com/rails/rails/issues/2941
> https://github.com/rails/rails/issues/2975
> 
> In the first one, they state that it's only a setting meant for external 
> resources.
> 
> Somebody on stackoverflow also pointed out that in Rails 2.3, you can set it 
> in environment.rb and then add "#encoding: utf-8" to the models that are 
> going to store the utf-8 values: 
> http://stackoverflow.com/questions/6494613/heroku-and-rails-how-to-set-utf-8-as-the-default-encoding
> 
> I don't know why the setting in config/application.rb isn't "app wide" (which 
> makes sense to me), but hopefully the links help you get around that,
> 
> Craig.
> 
> On Tue, Dec 13, 2011 at 2:06 PM, Dmytrii Nagirniak <[email protected]> wrote:
> Hi all,
> 
> I wonder maybe you know why Rails 3.1.3 doesn't obey the encoding set in the 
> config/application.rb?
> 
> Here is the related issue https://github.com/rails/rails/issues/3957
> 
> Not sure how I can workaround it for now.
> 
> Cheers,
> Dima.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby or Rails Oceania" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/rails-oceania?hl=en.
> 
> 
> 
> -- 
> Craig Read
> 
> @Catharz
> https://github.com/Catharz
> http://stackoverflow.com/users/158893/catharz
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby or Rails Oceania" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/rails-oceania?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.

Reply via email to