charset=(charset)
public
Sets the HTTP character set. In case of nil parameter it sets the charset to utf-8.
response.charset = 'utf-16'
response.charset = nil
# File actionpack/lib/action_dispatch/http/response.rb, line 255
def charset=(charset)
header_info = parse_content_type
if false == charset
set_header CONTENT_TYPE, header_info.mime_type
else
content_type = header_info.mime_type
set_content_type content_type, charset || self.class.default_charset
end
end