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
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
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