Hi,
I have a MSSQL db server which I am accessing from RoR. But
the database has a table T with a field name ("Hölle") consisting
of umlauts :( how to access this field??
Thanks,
Ram
--
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
-~----------~----~----~----~------~----~------~--~---
In your databases.yml you need encoding: utf8 as one of the parameters (assuming that is actually the encoding that your database are using. There''s also ruby''s kcode global that you should set (eg $KCODE = ''u'' in you environment.rb). You might also want to do a require ''jcode'' this changes some of the functions in String so that they work better for multibyte characters. Fred -- 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 -~----------~----~----~----~------~----~------~--~---
Actually I solved it using read_attribute... i.e.
def Hoelle
read_attribute("Hölle")
end
Thx for your input..
Ram> In your databases.yml you need
>
> encoding: utf8
> as one of the parameters (assuming that is actually the encoding that
> your database are using.
>
> There''s also ruby''s kcode global that you should set (eg
$KCODE = ''u'' in
> you environment.rb).
> You might also want to do a require ''jcode'' this changes
some of the
> functions in String so that they work better for multibyte characters.
>
> Fred
--
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
-~----------~----~----~----~------~----~------~--~---