Checking for C is not sufficient, it could also be ISO-8859 or something else.
By checking Enconding.locale_charmap we can check one place and have one way to spell "UTF-8". ENV['LANG'] and ENV['LC_*'] support a variety of notations which we'd have to be able to parse otherwise.
Ensure the system encoding is UTF-8
Checking for C is not sufficient, it could also be ISO-8859 or something
else.
By checking Enconding.locale_charmap we can check one place and have one
way to spell "UTF-8". ENV['LANG'] and ENV['LC_*'] support a variety of
notations which we'd have to be able to parse otherwise.