-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support charset meta tag. #3877
Conversation
This is a very good point but I would like a simpler implementation. Maybe we should just check response.charset given #3878 is merged. |
Why do you need the charset tag when we are already sending the Content-Type header containing a charset? |
He just explained: "If we save a page as html file. When we open the html file, we'll miss a charset." |
I think that Thus, I used But, certainly, my implementation is a little complexity. def charset_meta_tag
tag('meta', :charset => (response.charset || response.class.default_charset)).html_safe
end |
IMHO:
|
@josevalim OK! I'll fix and squash it after work. Just FYI: Java runtime know Windows-31J encoding, and this encoding is necessary for properly character conversion. |
Yeah, if this is the case, you should set response.charset then, and you |
Confirm. It's work fine (I set response.charset in a controller... My interpretation of the English, right?) I fixed and squished. |
This method is usefull for me, but not for majority (I guess) |
I know GH #3539 and #149.
But I want to propose it again, because I have another motivation.
I'm Japanese and resident in the multibyte world.
In my experience, if we don't write charset meta tag, we've got trouble in terms of the next.
If we save a page as html file.
When we open the html file, we'll miss a charset .