locale_charmap

Encoding.locale_charmap â string
Class Public methods

Returns the locale charmap name. It returns nil if no appropriate information.

Debian GNU/Linux
  LANG=C
    Encoding.locale_charmap  #=> "ANSI_X3.4-1968"
  LANG=ja_JP.EUC-JP
    Encoding.locale_charmap  #=> "EUC-JP"

SunOS 5
  LANG=C
    Encoding.locale_charmap  #=> "646"
  LANG=ja
    Encoding.locale_charmap  #=> "eucJP"

The result is highly platform dependent. So ::find may cause an error. If you need some encoding object even for unknown locale, ::find(âlocaleâ) can be used.

doc_ruby_on_rails
2015-04-04 21:35:56
Comments
Leave a Comment

Please login to continue.