module Encoding::CodePageMethods
Public Instance Methods
codepage_id()
click to toggle source
Find the code-page id that corresponds to this encoding.
@return Integer The Code Page Identifier @raise ArgumentError There is no Code Page Identifier for that Encoding
.
# File lib/encoding-codepage.rb, line 83 def codepage_id if names.detect{ |x| x =~ /\ACP([0-9]+)\z/ } Integer($1, 10) elsif codepage_encoding = CodePage.reverse_lookup[self] codepage_encoding.codepage_id else raise ArgumentError, "No Code Page Idenfier found for: #{self}" end end