Thank you very much for answers,

but i still have problems

> HTTP/HTML
>   content-type delivered by web server
>     should be 'Content-Type: text/html; charset=utf-8'
>   html content-type meta tag
>     should be '<meta http-equiv="content-type" 
> content="text/html;charset=utf-8" />'

for this i did:
application.rhtml
  <meta http-equiv="content-type" content="text/html;charset=utf-8" />
application.rb
  before_filter :set_charset

   def set_charset
     if request.xhr?
       headers["Content-Type"] = "text/javascript; charset=utf-8"
       else headers["Content-Type"] = "text/html; charset=utf-8"
      end
    end

> 
> Mysql settings:
>   In your application's console, execute the following:
>   r = Post.connection.execute "SHOW VARIABLES LIKE 'character%'"
>   r.each {|r|puts r}
>   This should result in something like this:
> 
>   character_set_client
>   utf8
>   character_set_connection
>   utf8
>   character_set_database
>   utf8
> 

Here i gen results:
["character_set_client", "latin1"]
["character_set_connection", "latin1"]
["character_set_database", "utf8"]
["character_set_filesystem", "binary"]
["character_set_results", "latin1"]
["character_set_server", "latin1"]
["character_set_system", "utf8"]
["character_sets_dir", "C:\\InstantRails\\mysql\\share\\charsets\\"]

> If your output differs, try the following:
> 
> set 'encoding: utf8' in environment.rb
>   (this affects the character_set_connection and character_set_client
>   values)
> 

in environement.rb i add:
ENV['LC_CTYPE'] = 'ru_RU.UTF8'
ENV['LANG'] = 'ru_RU.UTF8'
$KCODE = 'u'
require 'acts_as_ferret'


> set 'default-character-set=utf8' in the mysqld section of the mysql
>   configuration (/etc/mysql/my.cnf on linux). After restart of the 
> server,
>   newly created databases will be utf8 by default, and new tables in 
> these
>   databases will inherit this setting. Maybe it's possible to change the
>   character set of existing databases/tables, too, however your data 
> will
>   have to be converted, too. The per database setting imho is only a
>   default setting applied to new tables.
> 

What else to do?
Thanks
-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to