From: Cosimo Guglielmucci Date: 2010-10-27T23:00:09+09:00 Subject: Re: Windows, ODBC and charsets Cosimo Guglielmucci wrote in post #957424: > Now, > can I suppose that rails use -- require 'odbc_utf8' -- ? > I don't think so! > > Let's go looking for this switch... Ok, I've found someone with same interest here: http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/22cf506ad573e3dd/e5e658d1a00ae89f?#e5e658d1a00ae89f > and Christan tells us in his README: > Thus, depending on the -K option of ruby one could use > that code snippet: > > ... > if $KCODE == "UTF8" then > require 'odbc_utf8' > else > require 'odbc' > fi > >But in sqlserver_adapter.rb i can only find a line: > require_library_or_gem 'odbc' unless defined?(ODBC) > >So I inserted a require "odbc_utf8" in environment.rb, I've choosed to change sqlserver_adapter.rb instead, replacing the above with the following line: require_library_or_gem 'odbc_utf8' unless defined?(ODBC_UTF8) It works! Do you think that can result in some problems? Thank you, again, I've been spending a lot of time digging up for this result. -- Posted via http://www.ruby-forum.com/.