MrBanabas-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2007-Nov-27 15:02 UTC
oracle legacy database with ISO-8859-1
Hi, I ve got a legacy oracle database in ISO-8859-1 encoding, which is in use by other applications as well. Now, I would like to add a rails app for new features. Rails is using unicode so special characters are stored incorrectly in the database. Does anybody know how I might fix that. I ve already told my controllers to use that charset, but my models still store these values as utf8 and that goes directly into the database. :-( Converting the whole database to unicode is not an option due to the other legacy apps. Hope anybody can help me. thanks a lot in advance. -- Volker --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
hello, you should change kcode in your environment.rb : $KCODE ''NONE'' to specify ruby interpreter you don''t use utf-8. and check "encoding" parameter in database.yml. On Nov 27, 4:02 pm, "MrBana...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org" <MrBana...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> Hi, > > I ve got a legacy oracle database in ISO-8859-1 encoding, which is in > use by other applications as well. > > Now, I would like to add a rails app for new features. Rails is using > unicode so special characters are stored incorrectly in the database. > > Does anybody know how I might fix that. I ve already told my > controllers to use that charset, but my models still store these > values as utf8 and that goes directly into the database. :-( > > Converting the whole database to unicode is not an option due to the > other legacy apps. > > Hope anybody can help me. > > thanks a lot in advance. > > -- > Volker--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Please do post back to tell us if Jean-Sebestien''s suggestions work. If not, for my non-rails apps, I set the NLS_LANG variable in the environment to the character set of the database before starting the web server. This might or might not help. -- Cynthia Kiser cynthia.kiser-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
MrBanabas-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2007-Nov-28 13:20 UTC
Re: oracle legacy database with ISO-8859-1
Great, setting ENV[''NLS_LANG'']=''GERMAN_GERMANY.UTF8'' in my environment file fixed my issues. Thanks a lot. -- Volker --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---