Folks, I am trying to use utf-8 Tamil in a Rails application. When I edited Tamil unicode contents in a text box and checked the output. The text got distorted when it is showing it back. Any help appreciated -- -- Nandri, Dalit Amala http://www.tamil.net/ தமிழ் இணையம் Telford, UK http://www.erumbugal.com http://www.mindcolonies.com http://www.erumbugal.com/Profiles.AmalaSingh http://www.ryze.com/go/amalasingh http://del.icio.us/amalasingh/tamilhistory --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Dec 28, 5:39 pm, "Dalit Amala" <amalasi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am trying to use utf-8 Tamil in a Rails application.Are you using any plug-ins? I have an application that uses Mandarin Chinese. It works beautifully with the standard installation of Rails but when I added the Ferret text search plug-in, I could no longer use Unicode. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
There are many topics covering the proper setup of UTF-8. Try searching the forums. UTF-8 works fine for me with Japanese. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Dalit, There are several things you need to do. 1) Make sure your database has UTF-8 internationalization set 2) Check this out: http://wiki.rubyonrails.org/rails/pages/ InternationalizationComparison. 3) Use this for rails 1.1 script/plugin install http://svn.globalize-rails.org/svn/globalize/ globalize/ branches/for-1.1. On Dec 28, 2006, at 4:39 PM, Dalit Amala wrote:> Folks, > > I am trying to use utf-8 Tamil in a Rails application. When I > edited Tamil unicode contents in a text > box and checked the output. The text got distorted when it is > showing it back. > > Any help appreciated > > -- > -- > Nandri, > Dalit Amala > http://www.tamil.net/ > > Telford, UK > http://www.erumbugal.com > http://www.mindcolonies.com > http://www.erumbugal.com/Profiles.AmalaSingh > http://www.ryze.com/go/amalasingh > http://del.icio.us/amalasingh/tamilhistory > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''ve had that problem as well.
Adding this as a before_filter to application.rb seems to fix things. It
makes sure that all rhtml files are set to utf8, and spares RJS from setting
the content-type header so the code still executes.
# Switches to UTF8 charset
#
def configure_charsets
content_type = @headers["Content-Type"] ||
''text/html''
if /^text\//.match(content_type)
@headers["Content-Type"] = "#{content_type};
charset=utf-8"
end
ActiveRecord::Base.connection.execute ''SET NAMES UTF8''
end
Hope that helps.
On 12/28/06, Dalit Amala
<amalasingh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> Folks,
>
> I am trying to use utf-8 Tamil in a Rails application. When I edited Tamil
> unicode contents in a text
> box and checked the output. The text got distorted when it is showing it
> back.
>
> Any help appreciated
>
> --
> --
> Nandri,
> Dalit Amala
> http://www.tamil.net/
>
> Telford, UK
> http://www.erumbugal.com
> http://www.mindcolonies.com
> http://www.erumbugal.com/Profiles.AmalaSingh
> http://www.ryze.com/go/amalasingh
> http://del.icio.us/amalasingh/tamilhistory
> >
>
--
--------------------
seth at subimage interactive
-----
http://www.subimage.com
http://sublog.subimage.com
-----
http://www.getcashboard.com
http://dev.subimage.com/projects/substruct
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
I apologize for pointing people to my blog and then having it tank.
I''m having some server issues.
Allow me to say that my solution is not as elegant as RaPT but in
case you''re interested, here is my install_plugins.rake (in the lib/
tasks directory)
require ''yaml''
namespace :plugins do
desc "install a known list of plugins, specified in config/
base_plugins.yml"
task ''install_base'' do
f = YAML::load_file(File.join(RAILS_ROOT, ''config'',
''base_plugins.yml''))
f.each_pair do |plugin, options|
force, svn = '''', ''''
force = '' --force'' if (options[:force] &&
options
[:force].downcase == ''yes'')
svn = '' -X'' if (options[:svn] &&
options
[:svn].downcase == ''yes'')
if force.empty? && File.exist?(File.join(RAILS_ROOT,
"vendor/plugins/#{plugin}"))
puts "Skipping #{plugin} -- already installed and
force options not specified."
else
cmd = "ruby #{RAILS_ROOT}/script/plugin install #
{svn}#{options[''repos'']} #{plugin}#{force}"
puts "*** installing #{cmd}"
system(cmd)
end
end
end
end
Here is my standard ''base_plugins.yml'' (in the config
directory)
exception_notification:
repos: http://dev.rubyonrails.org/svn/rails/plugins/
exception_notification/
acts_as_authenticated:
repos: http://svn.techno-weenie.net/projects/plugins/
acts_as_authenticated
rspec:
repos: svn://rubyforge.org/var/svn/rspec/tags/REL_0_7_4/vendor/
rspec_on_rails/vendor/plugins/rspec
--steve
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---