Encodings in 1.2rc1

Hello,
I was using rhtml files in Windows-1257 encoding in my Rails 1.1.6
application, when I switched to 1.2rc1 (RAILS_GEM_VERSION =
'1.1.6.5618') I started getting strange errors ("...unterminated
string meets end of file (SyntaxError), parse error", "...unexpected
$, expecting kEND" and so on).
When I converted all files to utf-8, everything started working OK,
but my problem is that I'm using MS SQL Server database where data is
stored in Windows-1257 encoding so when I set
headers['Content-Type'] = "text/html; charset=utf-8"
all the text I get from db has strange characters.
How can fix this? How can I change default Rails encoding?

This thread might help you, Domas:
http://groups-beta.google.com/group/rubyonrails-talk/browse_thread/thread/5e3d1a4479ecaa56/b8a6f0f4fe46056c?lnk=gst&q=unterminated&rnum=1#b8a6f0f4fe46056c

Good luck!
Dave

Thanks for hint.

I tried setting:

ActionController::Base.default_charset = 'windows-1257'

in environment.rb, but this didin't help.

Domas

OK, found the solution. I just set $KCODE = 'N' in environment.rb.

So full solution:
$KCODE = 'N'
ActionController::Base.default_charset = 'windows-1257'