Methods

Included Modules

Locale::Driver::Win32

Public Instance Methods

charset() click to toggle source

Gets the Win32 charset of the locale.

    # File lib/locale/driver/win32.rb, line 35
35:       def charset
36:         charset = ::Locale::Driver::Env.charset
37:         unless charset
38:           if locales
39:             tag = locales[0].to_rfc.to_s
40:             loc = LocaleTable.find{|v| v[1] == tag}
41:             loc = LocaleTable.find{|v| v[1] =~ /^#{locales[0].language}/} unless loc
42:             charset = loc ? loc[2] : nil
43:           else
44:             charset = "CP1252"
45:           end
46:         end
47:         charset
48:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.