Displaying 1 result from an estimated 1 matches for "restore_kcode".
2006 Jan 05
1
unicode hacks - fixes for webrick and Safari
...ould need Unicode string
processing - it doesn''t seem likely to me, but you never know.
I have modified file actionpack_filters.rb, where I added the
following private methods:
def set_kcode_utf8
@old_kcode = $KCODE
$KCODE = ''u''
end
def restore_kcode
$KCODE = @old_kcode
end
and added these two as filters in init.rb:
Object::ActionController::Base.send(:before_filter, :set_kcode_utf8)
Object::ActionController::Base.send(:after_filter, :restore_kcode)
Additionally, I have modified the safari fix, so that it re-encodes
the entiti...