locale 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/COPYING +55 -0
- data/ChangeLog +113 -0
- data/README +100 -0
- data/Rakefile +77 -0
- data/doc/classes/Locale/Driver.html +375 -0
- data/doc/classes/Locale/Driver/CGI.html +502 -0
- data/doc/classes/Locale/Driver/Env.html +440 -0
- data/doc/classes/Locale/Driver/JRuby.html +390 -0
- data/doc/classes/Locale/Driver/Posix.html +431 -0
- data/doc/classes/Locale/Driver/Win32.html +398 -0
- data/doc/classes/Locale/Driver/Win32Table.html +356 -0
- data/doc/classes/Locale/Info.html +586 -0
- data/doc/classes/Locale/Info/Language.html +764 -0
- data/doc/classes/Locale/Info/Region.html +470 -0
- data/doc/classes/Locale/Tag/Cldr.html +547 -0
- data/doc/classes/Locale/Tag/Common.html +655 -0
- data/doc/classes/Locale/Tag/Illegular.html +424 -0
- data/doc/classes/Locale/Tag/Posix.html +612 -0
- data/doc/classes/Locale/Tag/Rfc.html +610 -0
- data/doc/classes/Locale/Tag/Simple.html +684 -0
- data/doc/classes/Locale/TagList.html +783 -0
- data/doc/classes/Locale/Util.html +476 -0
- data/doc/classes/Locale/Util/Memoizable.html +356 -0
- data/doc/created.rid +1 -0
- data/doc/files/ChangeLog.html +497 -0
- data/doc/files/README.html +525 -0
- data/doc/files/lib/locale/driver/cgi_rb.html +342 -0
- data/doc/files/lib/locale/driver/env_rb.html +354 -0
- data/doc/files/lib/locale/driver/jruby_rb.html +359 -0
- data/doc/files/lib/locale/driver/posix_rb.html +349 -0
- data/doc/files/lib/locale/driver/win32_rb.html +359 -0
- data/doc/files/lib/locale/driver/win32_table_rb.html +342 -0
- data/doc/files/lib/locale/info/language_rb.html +353 -0
- data/doc/files/lib/locale/info/region_rb.html +353 -0
- data/doc/files/lib/locale/info_rb.html +354 -0
- data/doc/files/lib/locale/tag/cldr_rb.html +342 -0
- data/doc/files/lib/locale/tag/common_rb.html +342 -0
- data/doc/files/lib/locale/tag/illegular_rb.html +349 -0
- data/doc/files/lib/locale/tag/posix_rb.html +342 -0
- data/doc/files/lib/locale/tag/rfc_rb.html +342 -0
- data/doc/files/lib/locale/tag/simple_rb.html +349 -0
- data/doc/files/lib/locale/tag_rb.html +374 -0
- data/doc/files/lib/locale/taglist_rb.html +342 -0
- data/doc/files/lib/locale/util/memoizable_rb.html +360 -0
- data/doc/files/lib/locale/version_rb.html +342 -0
- data/doc/files/lib/locale_rb.html +379 -0
- data/doc/fr_class_index.html +20 -0
- data/doc/fr_file_index.html +23 -0
- data/doc/fr_method_index.html +80 -0
- data/doc/index.html +1 -0
- data/doc/rdoc-style.css +320 -0
- data/lib/locale.rb +248 -0
- data/lib/locale/data/languages.tab.gz +0 -0
- data/lib/locale/data/regions.tab.gz +0 -0
- data/lib/locale/driver/cgi.rb +132 -0
- data/lib/locale/driver/env.rb +64 -0
- data/lib/locale/driver/jruby.rb +53 -0
- data/lib/locale/driver/posix.rb +49 -0
- data/lib/locale/driver/win32.rb +61 -0
- data/lib/locale/driver/win32_table.rb +298 -0
- data/lib/locale/info.rb +12 -0
- data/lib/locale/info/language.rb +134 -0
- data/lib/locale/info/region.rb +74 -0
- data/lib/locale/tag.rb +36 -0
- data/lib/locale/tag/cldr.rb +93 -0
- data/lib/locale/tag/common.rb +122 -0
- data/lib/locale/tag/illegular.rb +38 -0
- data/lib/locale/tag/posix.rb +97 -0
- data/lib/locale/tag/rfc.rb +106 -0
- data/lib/locale/tag/simple.rb +145 -0
- data/lib/locale/taglist.rb +93 -0
- data/lib/locale/util/memoizable.rb +76 -0
- data/lib/locale/version.rb +12 -0
- data/samples/cgi/README +20 -0
- data/samples/cgi/cookie.cgi +62 -0
- data/samples/cgi/http.rb +52 -0
- data/samples/cgi/index.cgi +90 -0
- data/samples/cgi/locale.css +115 -0
- data/samples/sample_1.rb +25 -0
- data/samples/sample_info.rb +6 -0
- data/setup.rb +1585 -0
- data/test/test_detect_cgi.rb +179 -0
- data/test/test_detect_general.rb +159 -0
- data/test/test_info.rb +28 -0
- data/test/test_tag.rb +1183 -0
- data/test/test_thread.rb +37 -0
- metadata +162 -0
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
locale/driver/cgi.rb
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2002-2008 Masao Mutoh
|
|
5
|
+
|
|
6
|
+
You may redistribute it and/or modify it under the same
|
|
7
|
+
license terms as Ruby.
|
|
8
|
+
|
|
9
|
+
Original: Ruby-GetText-Package-1.92.0.
|
|
10
|
+
|
|
11
|
+
$Id: cgi.rb 27 2008-12-03 15:06:50Z mutoh $
|
|
12
|
+
=end
|
|
13
|
+
|
|
14
|
+
module Locale
|
|
15
|
+
# Locale::Driver module for CGI.
|
|
16
|
+
# Detect the user locales and the charset from CGI parameters.
|
|
17
|
+
# This is a low-level class. Application shouldn't use this directly.
|
|
18
|
+
module Driver
|
|
19
|
+
module CGI
|
|
20
|
+
$stderr.puts self.name + " is loaded." if $DEBUG
|
|
21
|
+
|
|
22
|
+
@@default_locale = Locale::Tag::Simple.new("en")
|
|
23
|
+
@@default_charset = "UTF-8"
|
|
24
|
+
|
|
25
|
+
module_function
|
|
26
|
+
# Gets required locales from CGI parameters. (Based on RFC2616)
|
|
27
|
+
#
|
|
28
|
+
# Returns: An Array of Locale::Tag's subclasses
|
|
29
|
+
# (QUERY_STRING "lang" > COOKIE "lang" > HTTP_ACCEPT_LANGUAGE > "en")
|
|
30
|
+
#
|
|
31
|
+
def locales
|
|
32
|
+
return Locale::TagList.new([@@default_locale]) unless cgi
|
|
33
|
+
cgi_ = cgi
|
|
34
|
+
|
|
35
|
+
locales = Locale::TagList.new
|
|
36
|
+
|
|
37
|
+
# QUERY_STRING "lang"
|
|
38
|
+
if cgi_.has_key?("lang")
|
|
39
|
+
langs = cgi_.params["lang"]
|
|
40
|
+
if langs
|
|
41
|
+
langs.each do |lang|
|
|
42
|
+
locales << Locale::Tag.parse(lang)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
unless locales.size > 0
|
|
48
|
+
# COOKIE "lang"
|
|
49
|
+
langs = cgi_.cookies["lang"]
|
|
50
|
+
if langs
|
|
51
|
+
langs.each do |lang|
|
|
52
|
+
locales << Locale::Tag.parse(lang) if lang.size > 0
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
unless locales.size > 0
|
|
58
|
+
# HTTP_ACCEPT_LANGUAGE
|
|
59
|
+
if lang = cgi_.accept_language and lang.size > 0
|
|
60
|
+
locales += lang.gsub(/\s/, "").split(/,/).map{|v| v.split(";q=")}.map{|j| [j[0], j[1] ? j[1].to_f : 1.0]}.sort{|a,b| -(a[1] <=> b[1])}.map{|v| Locale::Tag.parse(v[0])}
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
unless locales.size > 0
|
|
65
|
+
locales << @@default_locale
|
|
66
|
+
end
|
|
67
|
+
Locale::TagList.new(locales.uniq)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Gets the charset from CGI parameters. (Based on RFC2616)
|
|
71
|
+
# * Returns: the charset (HTTP_ACCEPT_CHARSET > "UTF-8").
|
|
72
|
+
def charset
|
|
73
|
+
cgi_ = cgi
|
|
74
|
+
charsets = cgi_.accept_charset
|
|
75
|
+
if charsets and charsets.size > 0
|
|
76
|
+
num = charsets.index(',')
|
|
77
|
+
charset = num ? charsets[0, num] : charsets
|
|
78
|
+
charset = @@default_charset if charset == "*"
|
|
79
|
+
else
|
|
80
|
+
charset = @@default_charset
|
|
81
|
+
end
|
|
82
|
+
charset
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Sets a CGI object.
|
|
86
|
+
# * cgi_: CGI object
|
|
87
|
+
# * Returns: self
|
|
88
|
+
def set_cgi(cgi_)
|
|
89
|
+
Thread.current[:current_cgi] = cgi_
|
|
90
|
+
self
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def cgi #:nodoc:
|
|
94
|
+
Thread.current[:current_cgi]
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
@@locale_driver_module = Driver::CGI
|
|
100
|
+
|
|
101
|
+
module_function
|
|
102
|
+
# Sets a CGI object.
|
|
103
|
+
#
|
|
104
|
+
# Call Locale.init(:driver => :cgi) first.
|
|
105
|
+
#
|
|
106
|
+
# * cgi_: CGI object
|
|
107
|
+
# * Returns: self
|
|
108
|
+
def set_cgi(cgi_)
|
|
109
|
+
@@locale_driver_module.set_cgi(cgi_)
|
|
110
|
+
self
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Sets a CGI object.
|
|
114
|
+
#
|
|
115
|
+
# Call Locale.init(:driver => :cgi) first.
|
|
116
|
+
#
|
|
117
|
+
# * cgi_: CGI object
|
|
118
|
+
# * Returns: cgi_
|
|
119
|
+
def cgi=(cgi_)
|
|
120
|
+
set_cgi(cgi_)
|
|
121
|
+
cgi_
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Gets the CGI object. If it is nil, returns new CGI object.
|
|
125
|
+
#
|
|
126
|
+
# Call Locale.init(:driver => :cgi) first.
|
|
127
|
+
#
|
|
128
|
+
# * Returns: the CGI object
|
|
129
|
+
def cgi
|
|
130
|
+
@@locale_driver_module.cgi
|
|
131
|
+
end
|
|
132
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
locale/env.rb
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2008 Masao Mutoh
|
|
5
|
+
|
|
6
|
+
You may redistribute it and/or modify it under the same
|
|
7
|
+
license terms as Ruby.
|
|
8
|
+
|
|
9
|
+
Original: Ruby-GetText-Package-1.92.0.
|
|
10
|
+
|
|
11
|
+
$Id: env.rb 27 2008-12-03 15:06:50Z mutoh $
|
|
12
|
+
=end
|
|
13
|
+
|
|
14
|
+
require 'locale/tag'
|
|
15
|
+
require 'locale/taglist'
|
|
16
|
+
|
|
17
|
+
module Locale
|
|
18
|
+
module Driver
|
|
19
|
+
# Locale::Driver::Env module.
|
|
20
|
+
# Detect the user locales and the charset.
|
|
21
|
+
# All drivers(except CGI) refer environment variables first and use it
|
|
22
|
+
# as the locale if it's defined.
|
|
23
|
+
# This is a low-level module. Application shouldn't use this directly.
|
|
24
|
+
module Env
|
|
25
|
+
module_function
|
|
26
|
+
|
|
27
|
+
# Gets the locale from environment variable. (LC_ALL > LC_MESSAGES > LANG)
|
|
28
|
+
# Returns: the locale as Locale::Tag::Posix.
|
|
29
|
+
def locale
|
|
30
|
+
# At least one environment valiables should be set on *nix system.
|
|
31
|
+
[ENV["LC_ALL"], ENV["LC_MESSAGES"], ENV["LANG"]].each do |loc|
|
|
32
|
+
if loc != nil and loc.size > 0
|
|
33
|
+
return Locale::Tag::Posix.parse(loc)
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
nil
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Gets the locales from environment variables. (LANGUAGE > LC_ALL > LC_MESSAGES > LANG)
|
|
40
|
+
# * Returns: an Array of the locale as Locale::Tag::Posix or nil.
|
|
41
|
+
def locales
|
|
42
|
+
if (locales = ENV["LANGUAGE"])
|
|
43
|
+
Locale::TagList.new(locales.split(/:/).collect{|v| Locale::Tag::Posix.parse(v)})
|
|
44
|
+
elsif (loc = locale)
|
|
45
|
+
Locale::TagList.new([loc])
|
|
46
|
+
else
|
|
47
|
+
nil
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Gets the charset from environment variable or return nil.
|
|
52
|
+
# * Returns: the system charset.
|
|
53
|
+
def charset # :nodoc:
|
|
54
|
+
if loc = locale
|
|
55
|
+
loc.charset
|
|
56
|
+
else
|
|
57
|
+
nil
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
locale/driver/jruby.rb
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2007,2008 Masao Mutoh
|
|
5
|
+
|
|
6
|
+
You may redistribute it and/or modify it under the same
|
|
7
|
+
license terms as Ruby.
|
|
8
|
+
|
|
9
|
+
Original: Ruby-GetText-Package-1.92.0.
|
|
10
|
+
|
|
11
|
+
$Id: jruby.rb 27 2008-12-03 15:06:50Z mutoh $
|
|
12
|
+
=end
|
|
13
|
+
|
|
14
|
+
require 'locale/driver/env'
|
|
15
|
+
require 'java'
|
|
16
|
+
|
|
17
|
+
module Locale
|
|
18
|
+
module Driver
|
|
19
|
+
# Locale::Driver::JRuby module for JRuby
|
|
20
|
+
# Detect the user locales and the charset.
|
|
21
|
+
# This is a low-level class. Application shouldn't use this directly.
|
|
22
|
+
module JRuby
|
|
23
|
+
$stderr.puts self.name + " is loaded." if $DEBUG
|
|
24
|
+
|
|
25
|
+
if java.lang.System.getProperties['os.name'].downcase =~ /windows/
|
|
26
|
+
require 'locale/driver/win32_table'
|
|
27
|
+
|
|
28
|
+
extend ::Locale::Driver::Win32Table
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
module_function
|
|
32
|
+
def locales #:nodoc:
|
|
33
|
+
locales = ::Locale::Driver::Env.locales
|
|
34
|
+
unless locales
|
|
35
|
+
locale = java.util.Locale.getDefault
|
|
36
|
+
locales = TagList.new([Locale::Tag::Common.new(locale.getLanguage, nil,
|
|
37
|
+
locale.getCountry,
|
|
38
|
+
[locale.getVariant])])
|
|
39
|
+
end
|
|
40
|
+
locales
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def charset
|
|
44
|
+
charset = ::Locale::Driver::Env.charset
|
|
45
|
+
unless charset
|
|
46
|
+
charset = java.nio.charset.Charset.defaultCharset.name
|
|
47
|
+
end
|
|
48
|
+
charset
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
@@locale_driver_module = Driver::JRuby
|
|
53
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
locale/posix.rb
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2002-2008 Masao Mutoh
|
|
5
|
+
|
|
6
|
+
You may redistribute it and/or modify it under the same
|
|
7
|
+
license terms as Ruby.
|
|
8
|
+
|
|
9
|
+
Original: Ruby-GetText-Package-1.92.0.
|
|
10
|
+
|
|
11
|
+
$Id: posix.rb 27 2008-12-03 15:06:50Z mutoh $
|
|
12
|
+
=end
|
|
13
|
+
|
|
14
|
+
require 'locale/driver/env'
|
|
15
|
+
|
|
16
|
+
module Locale
|
|
17
|
+
# Locale::Driver::Posix module for Posix OS (Unix)
|
|
18
|
+
# Detect the user locales and the charset.
|
|
19
|
+
# This is a low-level class. Application shouldn't use this directly.
|
|
20
|
+
module Driver
|
|
21
|
+
module Posix
|
|
22
|
+
$stderr.puts self.name + " is loaded." if $DEBUG
|
|
23
|
+
|
|
24
|
+
module_function
|
|
25
|
+
# Gets the locales from environment variables. (LANGUAGE > LC_ALL > LC_MESSAGES > LANG)
|
|
26
|
+
# Only LANGUAGE accept plural languages such as "nl_BE;
|
|
27
|
+
# * Returns: an Array of the locale as Locale::Tag::Posix or nil.
|
|
28
|
+
def locales
|
|
29
|
+
::Locale::Driver::Env.locales
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Gets the charset from environment variable or the result of
|
|
33
|
+
# "locale charmap".
|
|
34
|
+
# * Returns: the system charset.
|
|
35
|
+
def charset
|
|
36
|
+
charset = ::Locale::Driver::Env.charset
|
|
37
|
+
unless charset
|
|
38
|
+
charset = `locale charmap`.strip
|
|
39
|
+
unless $? && $?.success?
|
|
40
|
+
charset = "UTF-8"
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
charset
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
@@locale_driver_module = Driver::Posix
|
|
48
|
+
end
|
|
49
|
+
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
locale/win32.rb
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2002-2008 Masao Mutoh
|
|
5
|
+
|
|
6
|
+
You may redistribute it and/or modify it under the same
|
|
7
|
+
license terms as Ruby.
|
|
8
|
+
|
|
9
|
+
Original: Ruby-GetText-Package-1.92.0.
|
|
10
|
+
|
|
11
|
+
$Id: win32.rb 27 2008-12-03 15:06:50Z mutoh $
|
|
12
|
+
=end
|
|
13
|
+
|
|
14
|
+
require 'locale/driver/env'
|
|
15
|
+
require 'locale/driver/win32_table'
|
|
16
|
+
require 'dl/win32'
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
module Locale
|
|
20
|
+
# Locale::Driver::Win32 module for win32.
|
|
21
|
+
# Detect the user locales and the charset.
|
|
22
|
+
# This is a low-level class. Application shouldn't use this directly.
|
|
23
|
+
module Driver
|
|
24
|
+
module Win32
|
|
25
|
+
include Win32Table
|
|
26
|
+
|
|
27
|
+
$stderr.puts self.name + " is loaded." if $DEBUG
|
|
28
|
+
|
|
29
|
+
@@win32 = Win32API.new("kernel32.dll", "GetUserDefaultLangID", nil, "i")
|
|
30
|
+
|
|
31
|
+
module_function
|
|
32
|
+
|
|
33
|
+
# Gets the Win32 charset of the locale.
|
|
34
|
+
def charset
|
|
35
|
+
charset = ::Locale::Driver::Env.charset
|
|
36
|
+
unless charset
|
|
37
|
+
loc = LocaleTable.find{|v| v[1] =locale.to_general}
|
|
38
|
+
loc = LocaleTable.find{|v| v[1] =~ /^#{locale.language}-/} unless loc
|
|
39
|
+
charset = loc ? loc[2] : "CP1252"
|
|
40
|
+
end
|
|
41
|
+
charset
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def locales #:nodoc:
|
|
45
|
+
locales = ::Locale::Driver::Env.locales
|
|
46
|
+
unless locales
|
|
47
|
+
lang = LocaleTable.assoc(@@win32.call)
|
|
48
|
+
if lang
|
|
49
|
+
ret = Locale::Tag::Common.parse(lang[1])
|
|
50
|
+
else
|
|
51
|
+
ret = Locale::Tag::Common.new("en")
|
|
52
|
+
end
|
|
53
|
+
locales = Locale::TagList.new([ret])
|
|
54
|
+
end
|
|
55
|
+
locales
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
@@locale_driver_module = Driver::Win32
|
|
60
|
+
end
|
|
61
|
+
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
win32_table.rb - Locale table for win32
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2008 Masao Mutoh <mutoh@highway.ne.jp>
|
|
5
|
+
|
|
6
|
+
You may redistribute it and/or modify it under the same
|
|
7
|
+
license terms as Ruby.
|
|
8
|
+
|
|
9
|
+
Original: Ruby-GetText-Package-1.92.0.
|
|
10
|
+
|
|
11
|
+
$Id: win32_table.rb 27 2008-12-03 15:06:50Z mutoh $
|
|
12
|
+
=end
|
|
13
|
+
|
|
14
|
+
module Locale
|
|
15
|
+
module Driver
|
|
16
|
+
module Win32Table
|
|
17
|
+
|
|
18
|
+
#http://msdn.microsoft.com/ja-jp/goglobal/bb896001(en-us).aspx
|
|
19
|
+
|
|
20
|
+
#LangID, locale name, code page
|
|
21
|
+
LocaleTable = [
|
|
22
|
+
[0x0036,"af","CP1252"],
|
|
23
|
+
[0x0436,"af-ZA","CP1252"],
|
|
24
|
+
[0x001C,"sq","CP1250"],
|
|
25
|
+
[0x041C,"sq-AL","CP1250"],
|
|
26
|
+
[0x0484,"gsw-FR","CP1252"],
|
|
27
|
+
[0x045E,"am-ET","UNICODE"],
|
|
28
|
+
[0x0001,"ar","CP1256"],
|
|
29
|
+
[0x1401,"ar-DZ","CP1256"],
|
|
30
|
+
[0x3C01,"ar-BH","CP1256"],
|
|
31
|
+
[0x0C01,"ar-EG","CP1256"],
|
|
32
|
+
[0x0801,"ar-IQ","CP1256"],
|
|
33
|
+
[0x2C01,"ar-JO","CP1256"],
|
|
34
|
+
[0x3401,"ar-KW","CP1256"],
|
|
35
|
+
[0x3001,"ar-LB","CP1256"],
|
|
36
|
+
[0x1001,"ar-LY","CP1256"],
|
|
37
|
+
[0x1801,"ar-MA","CP1256"],
|
|
38
|
+
[0x2001,"ar-OM","CP1256"],
|
|
39
|
+
[0x4001,"ar-QA","CP1256"],
|
|
40
|
+
[0x0401,"ar-SA","CP1256"],
|
|
41
|
+
[0x2801,"ar-SY","CP1256"],
|
|
42
|
+
[0x1C01,"ar-TN","CP1256"],
|
|
43
|
+
[0x3801,"ar-AE","CP1256"],
|
|
44
|
+
[0x2401,"ar-YE","CP1256"],
|
|
45
|
+
[0x002B,"hy","UNICODE"],
|
|
46
|
+
[0x042B,"hy-AM","UNICODE"],
|
|
47
|
+
[0x044D,"as-IN","UNICODE"],
|
|
48
|
+
[0x002C,"az","CP1254"],
|
|
49
|
+
[0x082C,"az-Cyrl-AZ","CP1251"],
|
|
50
|
+
[0x042C,"az-Latn-AZ","CP1254"],
|
|
51
|
+
[0x046D,"ba-RU","CP1251"],
|
|
52
|
+
[0x002D,"eu","CP1252"],
|
|
53
|
+
[0x042D,"eu-ES","CP1252"],
|
|
54
|
+
[0x0023,"be","CP1251"],
|
|
55
|
+
[0x0423,"be-BY","CP1251"],
|
|
56
|
+
[0x0845,"bn-BD","UNICODE"],
|
|
57
|
+
[0x0445,"bn-IN","UNICODE"],
|
|
58
|
+
[0x201A,"bs-Cyrl-BA","CP1251"],
|
|
59
|
+
[0x141A,"bs-Latn-BA","CP1250"],
|
|
60
|
+
[0x047E,"br-FR","CP1252"],
|
|
61
|
+
[0x0002,"bg","CP1251"],
|
|
62
|
+
[0x0402,"bg-BG","CP1251"],
|
|
63
|
+
[0x0003,"ca","CP1252"],
|
|
64
|
+
[0x0403,"ca-ES","CP1252"],
|
|
65
|
+
[0x0C04,"zh-HK","CP950"],
|
|
66
|
+
[0x1404,"zh-MO","CP950"],
|
|
67
|
+
[0x0804,"zh-CN","CP936"],
|
|
68
|
+
[0x0004,"zh-Hans","CP936"],
|
|
69
|
+
[0x1004,"zh-SG","CP936"],
|
|
70
|
+
[0x0404,"zh-TW","CP950"],
|
|
71
|
+
[0x7C04,"zh-Hant","CP950"],
|
|
72
|
+
[0x0483,"co-FR","CP1252"],
|
|
73
|
+
[0x001A,"hr","CP1250"],
|
|
74
|
+
[0x041A,"hr-HR","CP1250"],
|
|
75
|
+
[0x101A,"hr-BA","CP1250"],
|
|
76
|
+
[0x0005,"cs","CP1250"],
|
|
77
|
+
[0x0405,"cs-CZ","CP1250"],
|
|
78
|
+
[0x0006,"da","CP1252"],
|
|
79
|
+
[0x0406,"da-DK","CP1252"],
|
|
80
|
+
[0x048C,"prs-AF","CP1256"],
|
|
81
|
+
[0x0065,"div","UNICODE"],
|
|
82
|
+
[0x0465,"div-MV","UNICODE"],
|
|
83
|
+
[0x0013,"nl","CP1252"],
|
|
84
|
+
[0x0813,"nl-BE","CP1252"],
|
|
85
|
+
[0x0413,"nl-NL","CP1252"],
|
|
86
|
+
[0x0009,"en","CP1252"],
|
|
87
|
+
[0x0C09,"en-AU","CP1252"],
|
|
88
|
+
[0x2809,"en-BZ","CP1252"],
|
|
89
|
+
[0x1009,"en-CA","CP1252"],
|
|
90
|
+
[0x2409,"en-029","CP1252"],
|
|
91
|
+
[0x4009,"en-IN","CP1252"],
|
|
92
|
+
[0x1809,"en-IE","CP1252"],
|
|
93
|
+
[0x2009,"en-JM","CP1252"],
|
|
94
|
+
[0x4409,"en-MY","CP1252"],
|
|
95
|
+
[0x1409,"en-NZ","CP1252"],
|
|
96
|
+
[0x3409,"en-PH","CP1252"],
|
|
97
|
+
[0x4809,"en-SG","CP1252"],
|
|
98
|
+
[0x1C09,"en-ZA","CP1252"],
|
|
99
|
+
[0x2C09,"en-TT","CP1252"],
|
|
100
|
+
[0x0809,"en-GB","CP1252"],
|
|
101
|
+
[0x0409,"en-US","CP1252"],
|
|
102
|
+
[0x3009,"en-ZW","CP1252"],
|
|
103
|
+
[0x0025,"et","CP1257"],
|
|
104
|
+
[0x0425,"et-EE","CP1257"],
|
|
105
|
+
[0x0038,"fo","CP1252"],
|
|
106
|
+
[0x0438,"fo-FO","CP1252"],
|
|
107
|
+
[0x0464,"fil-PH","CP1252"],
|
|
108
|
+
[0x000B,"fi","CP1252"],
|
|
109
|
+
[0x040B,"fi-FI","CP1252"],
|
|
110
|
+
[0x000C,"fr","CP1252"],
|
|
111
|
+
[0x080C,"fr-BE","CP1252"],
|
|
112
|
+
[0x0C0C,"fr-CA","CP1252"],
|
|
113
|
+
[0x040C,"fr-FR","CP1252"],
|
|
114
|
+
[0x140C,"fr-LU","CP1252"],
|
|
115
|
+
[0x180C,"fr-MC","CP1252"],
|
|
116
|
+
[0x100C,"fr-CH","CP1252"],
|
|
117
|
+
[0x0462,"fy-NL","CP1252"],
|
|
118
|
+
[0x0056,"gl","CP1252"],
|
|
119
|
+
[0x0456,"gl-ES","CP1252"],
|
|
120
|
+
[0x0037,"ka","UNICODE"],
|
|
121
|
+
[0x0437,"ka-GE","UNICODE"],
|
|
122
|
+
[0x0007,"de","CP1252"],
|
|
123
|
+
[0x0C07,"de-AT","CP1252"],
|
|
124
|
+
[0x0407,"de-DE","CP1252"],
|
|
125
|
+
[0x1407,"de-LI","CP1252"],
|
|
126
|
+
[0x1007,"de-LU","CP1252"],
|
|
127
|
+
[0x0807,"de-CH","CP1252"],
|
|
128
|
+
[0x0008,"el","CP1253"],
|
|
129
|
+
[0x0408,"el-GR","CP1253"],
|
|
130
|
+
[0x046F,"kl-GL","CP1252"],
|
|
131
|
+
[0x0047,"gu","UNICODE"],
|
|
132
|
+
[0x0447,"gu-IN","UNICODE"],
|
|
133
|
+
[0x0468,"ha-Latn-NG","CP1252"],
|
|
134
|
+
[0x000D,"he","CP1255"],
|
|
135
|
+
[0x040D,"he-IL","CP1255"],
|
|
136
|
+
[0x0039,"hi","UNICODE"],
|
|
137
|
+
[0x0439,"hi-IN","UNICODE"],
|
|
138
|
+
[0x000E,"hu","CP1250"],
|
|
139
|
+
[0x040E,"hu-HU","CP1250"],
|
|
140
|
+
[0x000F,"is","CP1252"],
|
|
141
|
+
[0x040F,"is-IS","CP1252"],
|
|
142
|
+
[0x0470,"ig-NG","CP1252"],
|
|
143
|
+
[0x0021,"id","CP1252"],
|
|
144
|
+
[0x0421,"id-ID","CP1252"],
|
|
145
|
+
[0x085D,"iu-Latn-CA","CP1252"],
|
|
146
|
+
[0x045D,"iu-Cans-CA","UNICODE"],
|
|
147
|
+
[0x083C,"ga-IE","CP1252"],
|
|
148
|
+
[0x0434,"xh-ZA","CP1252"],
|
|
149
|
+
[0x0435,"zu-ZA","CP1252"],
|
|
150
|
+
[0x0010,"it","CP1252"],
|
|
151
|
+
[0x0410,"it-IT","CP1252"],
|
|
152
|
+
[0x0810,"it-CH","CP1252"],
|
|
153
|
+
[0x0011,"ja","CP932"],
|
|
154
|
+
[0x0411,"ja-JP","CP932"],
|
|
155
|
+
[0x004B,"kn","UNICODE"],
|
|
156
|
+
[0x044B,"kn-IN","UNICODE"],
|
|
157
|
+
[0x003F,"kk","CP1251"],
|
|
158
|
+
[0x043F,"kk-KZ","CP1251"],
|
|
159
|
+
[0x0453,"km-KH","UNICODE"],
|
|
160
|
+
[0x0486,"qut-GT","CP1252"],
|
|
161
|
+
[0x0487,"rw-RW","CP1252"],
|
|
162
|
+
[0x0041,"sw","CP1252"],
|
|
163
|
+
[0x0441,"sw-KE","CP1252"],
|
|
164
|
+
[0x0057,"kok","UNICODE"],
|
|
165
|
+
[0x0457,"kok-IN","UNICODE"],
|
|
166
|
+
[0x0012,"ko","CP949"],
|
|
167
|
+
[0x0412,"ko-KR","CP949"],
|
|
168
|
+
[0x0040,"ky","CP1251"],
|
|
169
|
+
[0x0440,"ky-KG","CP1251"],
|
|
170
|
+
[0x0454,"lo-LA","UNICODE"],
|
|
171
|
+
[0x0026,"lv","CP1257"],
|
|
172
|
+
[0x0426,"lv-LV","CP1257"],
|
|
173
|
+
[0x0027,"lt","CP1257"],
|
|
174
|
+
[0x0427,"lt-LT","CP1257"],
|
|
175
|
+
[0x082E,"wee-DE","CP1252"],
|
|
176
|
+
[0x046E,"lb-LU","CP1252"],
|
|
177
|
+
[0x002F,"mk","CP1251"],
|
|
178
|
+
[0x042F,"mk-MK","CP1251"],
|
|
179
|
+
[0x003E,"ms","CP1252"],
|
|
180
|
+
[0x083E,"ms-BN","CP1252"],
|
|
181
|
+
[0x043E,"ms-MY","CP1252"],
|
|
182
|
+
[0x044C,"ml-IN","UNICODE"],
|
|
183
|
+
[0x043A,"mt-MT","UNICODE"],
|
|
184
|
+
[0x0481,"mi-NZ","UNICODE"],
|
|
185
|
+
[0x047A,"arn-CL","CP1252"],
|
|
186
|
+
[0x004E,"mr","UNICODE"],
|
|
187
|
+
[0x044E,"mr-IN","UNICODE"],
|
|
188
|
+
[0x047C,"moh-CA","CP1252"],
|
|
189
|
+
[0x0050,"mn","CP1251"],
|
|
190
|
+
[0x0450,"mn-MN","CP1251"],
|
|
191
|
+
[0x0850,"mn-Mong-CN","UNICODE"],
|
|
192
|
+
[0x0461,"ne-NP","UNICODE"],
|
|
193
|
+
[0x0014,"no","CP1252"],
|
|
194
|
+
[0x0414,"nb-NO","CP1252"],
|
|
195
|
+
[0x0814,"nn-NO","CP1252"],
|
|
196
|
+
[0x0482,"oc-FR","CP1252"],
|
|
197
|
+
[0x0448,"or-IN","UNICODE"],
|
|
198
|
+
[0x0463,"ps-AF","UNICODE"],
|
|
199
|
+
[0x0029,"fa","CP1256"],
|
|
200
|
+
[0x0429,"fa-IR","CP1256"],
|
|
201
|
+
[0x0015,"pl","CP1250"],
|
|
202
|
+
[0x0415,"pl-PL","CP1250"],
|
|
203
|
+
[0x0016,"pt","CP1252"],
|
|
204
|
+
[0x0416,"pt-BR","CP1252"],
|
|
205
|
+
[0x0816,"pt-PT","CP1252"],
|
|
206
|
+
[0x0046,"pa","UNICODE"],
|
|
207
|
+
[0x0446,"pa-IN","UNICODE"],
|
|
208
|
+
[0x046B,"quz-BO","CP1252"],
|
|
209
|
+
[0x086B,"quz-EC","CP1252"],
|
|
210
|
+
[0x0C6B,"quz-PE","CP1252"],
|
|
211
|
+
[0x0018,"ro","CP1250"],
|
|
212
|
+
[0x0418,"ro-RO","CP1250"],
|
|
213
|
+
[0x0417,"rm-CH","CP1252"],
|
|
214
|
+
[0x0019,"ru","CP1251"],
|
|
215
|
+
[0x0419,"ru-RU","CP1251"],
|
|
216
|
+
[0x243B,"smn-FI","CP1252"],
|
|
217
|
+
[0x103B,"smj-NO","CP1252"],
|
|
218
|
+
[0x143B,"smj-SE","CP1252"],
|
|
219
|
+
[0x0C3B,"se-FI","CP1252"],
|
|
220
|
+
[0x043B,"se-NO","CP1252"],
|
|
221
|
+
[0x083B,"se-SE","CP1252"],
|
|
222
|
+
[0x203B,"sms-FI","CP1252"],
|
|
223
|
+
[0x183B,"sma-NO","CP1252"],
|
|
224
|
+
[0x1C3B,"sma-SE","CP1252"],
|
|
225
|
+
[0x004F,"sa","UNICODE"],
|
|
226
|
+
[0x044F,"sa-IN","UNICODE"],
|
|
227
|
+
[0x7C1A,"sr","CP1251"],
|
|
228
|
+
[0x1C1A,"sr-Cyrl-BA","CP1251"],
|
|
229
|
+
[0x0C1A,"sr-Cyrl-SP","CP1251"],
|
|
230
|
+
[0x181A,"sr-Latn-BA","CP1250"],
|
|
231
|
+
[0x081A,"sr-Latn-SP","CP1250"],
|
|
232
|
+
[0x046C,"nso-ZA","CP1252"],
|
|
233
|
+
[0x0432,"tn-ZA","CP1252"],
|
|
234
|
+
[0x045B,"si-LK","UNICODE"],
|
|
235
|
+
[0x001B,"sk","CP1250"],
|
|
236
|
+
[0x041B,"sk-SK","CP1250"],
|
|
237
|
+
[0x0024,"sl","CP1250"],
|
|
238
|
+
[0x0424,"sl-SI","CP1250"],
|
|
239
|
+
[0x000A,"es","CP1252"],
|
|
240
|
+
[0x2C0A,"es-AR","CP1252"],
|
|
241
|
+
[0x400A,"es-BO","CP1252"],
|
|
242
|
+
[0x340A,"es-CL","CP1252"],
|
|
243
|
+
[0x240A,"es-CO","CP1252"],
|
|
244
|
+
[0x140A,"es-CR","CP1252"],
|
|
245
|
+
[0x1C0A,"es-DO","CP1252"],
|
|
246
|
+
[0x300A,"es-EC","CP1252"],
|
|
247
|
+
[0x440A,"es-SV","CP1252"],
|
|
248
|
+
[0x100A,"es-GT","CP1252"],
|
|
249
|
+
[0x480A,"es-HN","CP1252"],
|
|
250
|
+
[0x080A,"es-MX","CP1252"],
|
|
251
|
+
[0x4C0A,"es-NI","CP1252"],
|
|
252
|
+
[0x180A,"es-PA","CP1252"],
|
|
253
|
+
[0x3C0A,"es-PY","CP1252"],
|
|
254
|
+
[0x280A,"es-PE","CP1252"],
|
|
255
|
+
[0x500A,"es-PR","CP1252"],
|
|
256
|
+
[0x0C0A,"es-ES","CP1252"],
|
|
257
|
+
[0x540A,"es-US","CP1252"],
|
|
258
|
+
[0x380A,"es-UY","CP1252"],
|
|
259
|
+
[0x200A,"es-VE","CP1252"],
|
|
260
|
+
[0x001D,"sv","CP1252"],
|
|
261
|
+
[0x081D,"sv-FI","CP1252"],
|
|
262
|
+
[0x041D,"sv-SE","CP1252"],
|
|
263
|
+
[0x005A,"syr","UNICODE"],
|
|
264
|
+
[0x045A,"syr-SY","UNICODE"],
|
|
265
|
+
[0x0428,"tg-Cyrl-TJ","CP1251"],
|
|
266
|
+
[0x085F,"tmz-Latn-DZ","CP1252"],
|
|
267
|
+
[0x0049,"ta","UNICODE"],
|
|
268
|
+
[0x0449,"ta-IN","UNICODE"],
|
|
269
|
+
[0x0044,"tt","CP1251"],
|
|
270
|
+
[0x0444,"tt-RU","CP1251"],
|
|
271
|
+
[0x004A,"te","UNICODE"],
|
|
272
|
+
[0x044A,"te-IN","UNICODE"],
|
|
273
|
+
[0x001E,"th","CP874"],
|
|
274
|
+
[0x041E,"th-TH","CP874"],
|
|
275
|
+
[0x0451,"bo-CN","UNICODE"],
|
|
276
|
+
[0x001F,"tr","CP1254"],
|
|
277
|
+
[0x041F,"tr-TR","CP1254"],
|
|
278
|
+
[0x0442,"tk-TM","CP1250"],
|
|
279
|
+
[0x0480,"ug-CN","CP1256"],
|
|
280
|
+
[0x0022,"uk","CP1251"],
|
|
281
|
+
[0x0422,"uk-UA","CP1251"],
|
|
282
|
+
[0x042E,"wen-DE","CP1252"],
|
|
283
|
+
[0x0020,"ur","CP1256"],
|
|
284
|
+
[0x0420,"ur-PK","CP1256"],
|
|
285
|
+
[0x0043,"uz","CP1254"],
|
|
286
|
+
[0x0843,"uz-Cyrl-UZ","CP1251"],
|
|
287
|
+
[0x0443,"uz-Latn-UZ","CP1254"],
|
|
288
|
+
[0x002A,"vi","CP1258"],
|
|
289
|
+
[0x042A,"vi-VN","CP1258"],
|
|
290
|
+
[0x0452,"cy-GB","CP1252"],
|
|
291
|
+
[0x0488,"wo-SN","CP1252"],
|
|
292
|
+
[0x0485,"sah-RU","CP1251"],
|
|
293
|
+
[0x0478,"ii-CN","UNICODE"],
|
|
294
|
+
[0x046A,"yo-NG","CP1252"],
|
|
295
|
+
]
|
|
296
|
+
end
|
|
297
|
+
end
|
|
298
|
+
end
|