Problems with iso 8859-9 chars


#1

Hi,

I am using ruby 1.8 and mysql 5. My tables charset is latin1 and i use
some turkish chars. When i am using RoR on Webrick chars seems like ???
if i change character encoding from browser to windows-1254 or
iso-8859-9 it is ok but it comes to me default as utf8. So i use

in layout files in my project but there is no affect. How can i change
default charset of webrick utf8 to iso-8859-9.

Ps: i try to convert my table utf8 form latin1 but there is no affect in
my application.

Thanks for all answers.


#2

On 12/9/05, Serbulent UNSAL removed_email_address@domain.invalid wrote:

charset=iso-8859-9">

in layout files in my project but there is no affect. How can i change
default charset of webrick utf8 to iso-8859-9.

Ps: i try to convert my table utf8 form latin1 but there is no affect in
my application.

Thanks for all answers.

try this in your controller:

headers[‘Content-Type’] = ‘text/html; charset=iso-8859-9’


rick
http://techno-weenie.net


#3

Are you using Rails 0.14.4?

I found that Rails 0.14.4 doesn’t access mysql in correct encoding,
but Rails 0.14.3 does not have this problem.

I don’t know if this is a bug or we should have to install mysql-ruby
and set “encoding: UTF8” in database.yml.


#4

On 12/9/05, Rick O. removed_email_address@domain.invalid wrote:

charset=windows-1254">

try this in your controller:

headers[‘Content-Type’] = ‘text/html; charset=iso-8859-9’

Is there no default way to specify the coding?

I am now working around this by using a before filter, but I guess that
there is an easier way to do this, isn’t there?

I fgrep’ed my project directory for encoding, but nothing came up.

Cheers,
Mariano


#5

Sorry, it seems that we encountered different problems.

My problem is that I have utf8 tables, but Rails 0.14.4 doesn’t
retrieve and write data in utf8 encoding.


#6

Hi

Ä° write the code to my application.rb

but i take the error

undefined local variable or method `headers’ for
ApplicationController:Class

Serbulent

technoweenie wrote:

try this in your controller:

headers[‘Content-Type’] = ‘text/html; charset=iso-8859-9’


rick
http://techno-weenie.net