Encodings in 1.2rc1

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 =
'') 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:

Good luck!

Thanks for hint.

I tried setting:

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

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


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

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