module Locale::Driver::Posix

def charset

* Returns: the system charset.
"locale charmap" or nil.
Gets the charset from environment variable or the result of
def charset
  charset = ::Locale::Driver::Env.charset
  unless charset
    charset = `locale charmap`.strip
    unless $? && $?.success?
      charset = nil
    end
  end
  charset
end

def locales

* Returns: an Array of the locale as Locale::Tag::Posix or nil.
Only LANGUAGE accept plural languages such as "nl_BE;
Gets the locales from environment variables. (LANGUAGE > LC_ALL > LC_MESSAGES > LANG)
def locales
  ::Locale::Driver::Env.locales
end