On Sun, Jul 4, 2010 at 5:58 PM, Fernando Perez <[email protected]> wrote:

>
> > The application that I'm working on support German, Spanish, Russian,
> > Japanese, French, Portuguese, and Chinese.
> >
>
> uh? Did you have to add plenty magic comments to your files? Do you need
> to force_encoding on certain strings such as those returned by rdiscount
> or hpricot?
>
>
I did not use either hpricot and rdiscount within our development or
production
application.  Next, I did not have to force encoding because the underlying
OS
environment is UTF-8 by default.  Thus, you need to make sure that your
external
encoding (.i.e. the encoding used for files) and internal encoding (.i.e.
the encoding
that's used for the creation of new string) match up.  BTW, I found this
information
when I did my initial research on putting together a multilingual
application using
Ruby/Rails.  The default encoding used in Ruby 1.9 is ASCII-7BIT which is
the
same for Ruby 1.8.  Did you read the relevant chapters in "Programming Ruby
1.9"?
If not, I would highly recommend reading them because they provide a wealth
of
information.


> What changes did you make to your rails app when you moved from Ruby 1.8
> to 1.9.x to avoid the dreaded US-ASCII conflict?
>

I remember having to set the default internal encoding and I was good to go.
 Thus,
I had to do the following:

Encoding.default_internal = 'utf-8'

Next, I'm using HTML 5 technologies and the view templates are set to utf-8
within the head tag.

Good luck,

-Conrad


> --
> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to