structured_csv 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/main.yml +18 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.rubocop.yml +13 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +12 -0
- data/README.adoc +205 -0
- data/Rakefile +12 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/exe/csv_join.rb +95 -0
- data/exe/structured_csv_to_yaml.rb +254 -0
- data/lib/structured_csv.rb +8 -0
- data/lib/structured_csv/version.rb +5 -0
- data/samples/T-SP-E.212B-2018.et.csv +89 -0
- data/samples/T-SP-E.212B-2018.et.yaml +471 -0
- data/samples/T-SP-F.1-1998-MSW.csv +238 -0
- data/samples/T-SP-F.1-1998-MSW.yaml +1928 -0
- data/samples/T-SP-SR.1-2012.csv +99 -0
- data/samples/T-SP-SR.1-2012.yaml +1081 -0
- data/structured_csv.gemspec +34 -0
- metadata +67 -0
@@ -0,0 +1,254 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'csv'
|
3
|
+
require 'yaml'
|
4
|
+
|
5
|
+
module CsvToStructuredHash
|
6
|
+
|
7
|
+
def self.get_portion(csv, section_name)
|
8
|
+
first_row = nil
|
9
|
+
last_row = -1
|
10
|
+
data_meta = {}
|
11
|
+
|
12
|
+
puts "section_name #{section_name}"
|
13
|
+
|
14
|
+
csv.each_with_index do |row, index|
|
15
|
+
if first_row.nil? && is_start_of_portion?(row, section_name)
|
16
|
+
# puts"found first"
|
17
|
+
|
18
|
+
row[1].split(';').each do |opt|
|
19
|
+
k, v = opt.split('=')
|
20
|
+
data_meta[k.to_sym] = v
|
21
|
+
end if row[1] && !row[1].empty?
|
22
|
+
|
23
|
+
first_row = index+1
|
24
|
+
next
|
25
|
+
end
|
26
|
+
|
27
|
+
if !first_row.nil? && is_row_empty?(row)
|
28
|
+
# puts "found last"
|
29
|
+
last_row = index
|
30
|
+
break
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# puts "first #{first_row} last #{last_row}"
|
35
|
+
{
|
36
|
+
first_row: first_row,
|
37
|
+
last_row: last_row,
|
38
|
+
rows: csv[first_row..last_row],
|
39
|
+
meta: data_meta
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.is_start_of_portion?(row, section_name)
|
44
|
+
return false if row.first.nil?
|
45
|
+
row.first.strip.to_s == section_name.to_s
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.is_row_empty?(row)
|
49
|
+
row.map do |f|
|
50
|
+
f.is_a?(String) ? f.strip : f
|
51
|
+
end.all?(&:nil?)
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.get_csv(csv_filename)
|
55
|
+
content = File.read(csv_filename, encoding: "bom|utf-8")
|
56
|
+
CSV.parse(content, liberal_parsing: true, encoding: "UTF-8")
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.split_header_key_type(header_field)
|
60
|
+
field_name = ""
|
61
|
+
field_type = CAST_DEFAULT_TYPE
|
62
|
+
|
63
|
+
# puts header_field
|
64
|
+
arr = header_field.match(/\A(.*)\[(.*)\]\Z/)
|
65
|
+
|
66
|
+
if arr.nil?
|
67
|
+
field_name = header_field
|
68
|
+
else
|
69
|
+
field_name = arr[1]
|
70
|
+
field_type = arr[2]
|
71
|
+
end
|
72
|
+
|
73
|
+
{
|
74
|
+
name: field_name,
|
75
|
+
type: field_type
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
CAST_DEFAULT_TYPE = "string".freeze
|
80
|
+
|
81
|
+
def self.cast_type(value, type_in_string)
|
82
|
+
return if value.nil?
|
83
|
+
type = type_in_string.downcase
|
84
|
+
|
85
|
+
case type
|
86
|
+
when "boolean"
|
87
|
+
if value.downcase == "true"
|
88
|
+
true
|
89
|
+
elsif value.downcase == "false"
|
90
|
+
false
|
91
|
+
end
|
92
|
+
when "integer"
|
93
|
+
value.to_s.strip.to_i
|
94
|
+
when "string"
|
95
|
+
value.to_s.strip
|
96
|
+
when /^array\{(.*)\}/
|
97
|
+
val_type = Regexp.last_match[1] || CAST_DEFAULT_TYPE
|
98
|
+
value.split(";").map do |v|
|
99
|
+
# puts "cast type as #{v}, #{val_type.to_s}"
|
100
|
+
cast_type(v, val_type.to_s)
|
101
|
+
end
|
102
|
+
else
|
103
|
+
value.to_s
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
def self.parse_metadata(rows)
|
108
|
+
hash = {}
|
109
|
+
|
110
|
+
rows.each_with_index do |row,index|
|
111
|
+
# Skip all the empty rows
|
112
|
+
next if is_row_empty?(row)
|
113
|
+
|
114
|
+
name_type = split_header_key_type(row.first)
|
115
|
+
key = name_type[:name]
|
116
|
+
type = name_type[:type]
|
117
|
+
|
118
|
+
value = cast_type(row[1], type)
|
119
|
+
hash[key] = value
|
120
|
+
end
|
121
|
+
|
122
|
+
# puts "=============================METADATA================="
|
123
|
+
# pp hash
|
124
|
+
normalize_namespaces(hash)
|
125
|
+
end
|
126
|
+
|
127
|
+
def self.parse_data(rows, data_meta)
|
128
|
+
header = []
|
129
|
+
data_name = data_meta[:name]
|
130
|
+
data_type = data_meta[:type] || "hash"
|
131
|
+
data_key = data_meta[:key]
|
132
|
+
|
133
|
+
base_structure = case data_type
|
134
|
+
when "hash"
|
135
|
+
{}
|
136
|
+
when "array"
|
137
|
+
[]
|
138
|
+
end
|
139
|
+
|
140
|
+
rows.each_with_index do |row,index|
|
141
|
+
# Assume the first column is always the key
|
142
|
+
if index == 0
|
143
|
+
# puts "row #{row}"
|
144
|
+
header = row.map do |field|
|
145
|
+
split_header_key_type(field) unless field.nil?
|
146
|
+
end.compact
|
147
|
+
|
148
|
+
if data_type == "hash" && data_key.nil?
|
149
|
+
data_key = header.first
|
150
|
+
end
|
151
|
+
|
152
|
+
next
|
153
|
+
end
|
154
|
+
# puts "header #{header.inspect}"
|
155
|
+
|
156
|
+
# Skip all the empty rows
|
157
|
+
next if is_row_empty?(row)
|
158
|
+
|
159
|
+
# Skip if no key value
|
160
|
+
next if row[0].nil?
|
161
|
+
|
162
|
+
header_names = header.inject([]) do |acc,v|
|
163
|
+
acc << v[:name]
|
164
|
+
end
|
165
|
+
|
166
|
+
row_values = []
|
167
|
+
header.each_with_index do |h, i|
|
168
|
+
v = row[i]
|
169
|
+
v = v.strip unless v.nil?
|
170
|
+
row_values[i] = cast_type(v, h[:type])
|
171
|
+
end
|
172
|
+
|
173
|
+
k = row_values[0]
|
174
|
+
d = Hash[header_names[0..-1].zip(row_values[0..-1])]
|
175
|
+
# .transform_keys { |k| k.to_sym }
|
176
|
+
|
177
|
+
# Remove keys if they point to nil
|
178
|
+
d.keys.each do |k|
|
179
|
+
d.delete(k) if d[k].nil?
|
180
|
+
end
|
181
|
+
|
182
|
+
case data_type
|
183
|
+
when "hash"
|
184
|
+
unless base_structure[k].nil?
|
185
|
+
puts "[WARNING] there is already data inside key [#{k}] -- maybe you should set type=array?"
|
186
|
+
end
|
187
|
+
base_structure[k] = normalize_namespaces(d)
|
188
|
+
when "array"
|
189
|
+
base_structure << normalize_namespaces(d)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
if data_name
|
194
|
+
base_structure = {
|
195
|
+
data_name => base_structure
|
196
|
+
}
|
197
|
+
end
|
198
|
+
|
199
|
+
base_structure
|
200
|
+
end
|
201
|
+
|
202
|
+
def self.convert(csv_filename)
|
203
|
+
raw_data = get_csv(csv_filename)
|
204
|
+
|
205
|
+
metadata_section = get_portion(raw_data, "METADATA")
|
206
|
+
data_section = get_portion(raw_data, "DATA")
|
207
|
+
|
208
|
+
# puts '----------'
|
209
|
+
# pp data_section[:rows]
|
210
|
+
# puts '----------'
|
211
|
+
|
212
|
+
{
|
213
|
+
"metadata" => parse_metadata(metadata_section[:rows]),
|
214
|
+
"data" => parse_data(data_section[:rows], data_section[:meta])
|
215
|
+
}
|
216
|
+
end
|
217
|
+
|
218
|
+
# Structure all child hashes if the key is namespaced.
|
219
|
+
# e.g. { "hello.me" => data } becomes
|
220
|
+
# { "hello" => { "me" => data } }
|
221
|
+
#
|
222
|
+
def self.normalize_namespaces(hash)
|
223
|
+
new_hash = {}
|
224
|
+
|
225
|
+
hash.each_pair do |k, v|
|
226
|
+
# puts"k (#{k}) v (#{v})"
|
227
|
+
key_components = k.to_s.split('.')
|
228
|
+
|
229
|
+
level = new_hash
|
230
|
+
last_component = key_components.pop
|
231
|
+
key_components.each do |component|
|
232
|
+
# puts"c (#{component})"
|
233
|
+
level[component] ||= {}
|
234
|
+
level = level[component]
|
235
|
+
end
|
236
|
+
|
237
|
+
level[last_component] = v
|
238
|
+
end
|
239
|
+
|
240
|
+
new_hash
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
csvfile = ARGV.pop
|
245
|
+
raise "first argument must be a .csv file!" unless csvfile =~ /\.csv$/
|
246
|
+
|
247
|
+
outfile = csvfile.gsub(/csv$/, "yaml")
|
248
|
+
|
249
|
+
IO.write(
|
250
|
+
outfile,
|
251
|
+
CsvToStructuredHash.convert(csvfile).to_yaml
|
252
|
+
)
|
253
|
+
|
254
|
+
# pp CsvToStructuredHash.convert(filename)
|
@@ -0,0 +1,89 @@
|
|
1
|
+
METADATA,,,,,,,,,
|
2
|
+
title.en,"Extra-territorial use* of MCC/MNC, Annex E to Recommendation ITU-T E.212",,,,,,,,
|
3
|
+
locale.country_or_area.en,Country or Geographical Area,,,,,,,,
|
4
|
+
locale.mcc_mnc.en,MCC + MNC**,,,,,,,,
|
5
|
+
locale.msin_range.en,MSIN range***,,,,,,,,
|
6
|
+
locale.operator_network.en,Operator/Network,,,,,,,,
|
7
|
+
title.fr,"Utilisation extraterritoriale* du MCC/MNC, Annexe E à la Recommandation UIT-T E.212",,,,,,,,
|
8
|
+
locale.country_or_area.fr,Pays ou Zone géographique,,,,,,,,
|
9
|
+
locale.mcc_mnc.fr,MCC + MNC**,,,,,,,,
|
10
|
+
locale.msin_range.fr,Série de numéros MSIN***,,,,,,,,
|
11
|
+
locale.operator_network.fr,Nom de Réseau/Opérateur,,,,,,,,
|
12
|
+
title.es,"Utilización extraterritorial* de MCC/MNC, Anexo E a la Recomendación UIT-T E.212",,,,,,,,
|
13
|
+
locale.country_or_area.es,País o Zona geografica,,,,,,,,
|
14
|
+
locale.mcc_mnc.es,MCC + MNC**,,,,,,,,
|
15
|
+
locale.msin_range.es,Gama de MSIN***,,,,,,,,
|
16
|
+
locale.operator_network.es,Nombre de la Red/Operador,,,,,,,,
|
17
|
+
title.ru,"Экстерриториальное использование* кодов MCC/MNC, Приложение E к Рекомендации МСЭ-T E.212",,,,,,,,
|
18
|
+
locale.country_or_area.ru,Страна или географическая зона,,,,,,,,
|
19
|
+
locale.mcc_mnc.ru,MCC + MNC**,,,,,,,,
|
20
|
+
locale.msin_range.ru,Диапазон MSIN***,,,,,,,,
|
21
|
+
locale.operator_network.ru,Оператор/сеть,,,,,,,,
|
22
|
+
title.zh,ITU-T E.212建议书附件E,境外使用*MCC/MNC,,,,,,,,
|
23
|
+
locale.country_or_area.zh,国家或地理区域,,,,,,,,
|
24
|
+
locale.mcc_mnc.zh,MCC + MNC**,,,,,,,,
|
25
|
+
locale.msin_range.zh,移动用户识别码号段***,,,,,,,,
|
26
|
+
locale.operator_network.zh,运营商/网络,,,,,,,,
|
27
|
+
title.ar,"استعمال الرموز MCC/MNC خارج الأراضي الإقليمية*، الملحق E بالتوصية ITU-T E.212",,,,,,,,
|
28
|
+
locale.country_or_area.ar,"البلد
|
29
|
+
أو المنطقة الجغرافية",,,,,,,,
|
30
|
+
locale.mcc_mnc.ar,**MNC + MCC,,,,,,,,
|
31
|
+
locale.msin_range.ar,مدى رقم هوية المشترك المتنقل (MSIN)***,,,,,,,,
|
32
|
+
locale.operator_network.ar,المشغل/الشبكة,,,,,,,,
|
33
|
+
note_1.en,"As defined in Annex E to Recommendation ITU-T E.212, extra-territorial use of an MCC+MNC is the term used to describe the situation where a MCC+MNC that has been assigned to an operator in one country, Country A, is used in another country, Country B, through a base station established in Country B.",,,,,,,,
|
34
|
+
note_1.fr,"Comme défini dans l'Annexe E à la Recommandation UIT-T E.212, l'utilisation extraterritoriale d'une ressource MCC+MNC est l'expression employée pour décrire la situation dans laquelle une ressource MCC+MNC attribuée à un opérateur dans un pays, le pays A, est utilisée dans un autre pays, le pays B, par l'intermédiaire d'une station de base établie dans le pays B.",,,,,,,,
|
35
|
+
note_1.es,"Según el Anexo E a la Recomendación UIT-T E.212, la utilización extraterritorial de MCC+MNC es el término que se emplea para describir la situación en que un MCC+MNC asignado a un operador de un país (""País A"") se utiliza en otro país (""País B"") mediante una estación de base establecida en el País B.",,,,,,,,
|
36
|
+
note_1.ru,"Согласно определению в Приложении E к Рекомендации МСЭ-T E.212, экстратерриториальное использование кодов MCC+MNC – это термин, применяемый для описания ситуации, при которой коды MCC+MNC, присвоенные оператору в одной стране (страна A), используются в другой стране (страна B) через базовую станцию, установленную в Стране B. ",,,,,,,,
|
37
|
+
note_1.zh,如 ITU-T E.212建议书附件E定义,境外使用的MCC+MNC是用来描述以下情形的术语,即一运营商在一个国家(“国家A”)分配到的MCC+MNC,通过在另一个国家(“国家B”)建立的基站用于国家B,,,,,,,,
|
38
|
+
note_1.ar,"استعمال الرمز الثنائي MCC+MNC خارج الأراضي الإقليمية، كما هو معرّف في الملحق E بالتوصية ITU-T E.212، هو المصطلح الذي يستعمل لوصف الحالة التي يكون فيها الرمز الثنائي MCC+MNC المخصص لمشغل في بلد (""بلد A"") مستعملاً في بلد آخر (""بلد B"") من خلال محطة قاعدة منشأة في البلد B.",,,,,,,,
|
39
|
+
note_2.en,MCC: Mobile Country Code / MNC: Mobile Network Code ,,,,,,,,
|
40
|
+
note_2.fr,MCC: Indicatif de pays du mobile / MNC: Code de réseau mobile,,,,,,,,
|
41
|
+
note_2.es,MCC: Indicativo de país para el servicio móvil / MNC: Indicativo de red para el servicio móvil,,,,,,,,
|
42
|
+
note_2.ru,"MCC: Код страны в системе подвижной связи/Mobile Country Code
|
43
|
+
MNC: Код сети подвижной связи/Mobile Network Code",,,,,,,,
|
44
|
+
note_2.zh,MCC: 移动国家代码 / MNC: 移动网络代码,,,,,,,,
|
45
|
+
note_2.ar,MCC: الرمز الدليلي القُطري للاتصالات المتنقلة / MNC: الرمز الدليلي للشبكة المتنقلة ,,,,,,,,
|
46
|
+
note_3.en,MSIN: Mobile Subscription Identification Number,,,,,,,,
|
47
|
+
note_3.fr,MSIN: numéro d'identification d'abonnement mobile,,,,,,,,
|
48
|
+
note_3.es,MSIN: número de identificación de suscripción al servicio móvil,,,,,,,,
|
49
|
+
note_3.ru,MSIN: Идентификационный номер абонента подвижной связи/Mobile Subscription Identification Number,,,,,,,,
|
50
|
+
note_3.zh,MSIN:移动订户标识码,,,,,,,,
|
51
|
+
note_3.ar,MSIN: رقم تعرف هوية الاشتراك المتنقل,,,,,,,,
|
52
|
+
,,,,,,,,,
|
53
|
+
DATA,type=array,,,,,,,,
|
54
|
+
country_or_area.en,country_or_area.fr,country_or_area.es,country_or_area.ru,country_or_area.zh,country_or_area.ar,country_type,mcc_mnc,msin_range,operator_network
|
55
|
+
France,France,Francia,Франция,法国,فرنسا,A,208 01,0000000000-0099999999,Orange
|
56
|
+
France,France,Francia,Франция,法国,فرنسا,A,208 01,0200000000-9999999999,Orange
|
57
|
+
Monaco,Monaco,Mónaco,Монако,摩纳哥,موناكو,B,208 01,0100000000-0199999999,Orange/Monaco Télécom
|
58
|
+
France,France,Francia,Франция,法国,فرنسا,A,208 10,0000000000 - 2654099999,Société Française du Radiotéléphone
|
59
|
+
France,France,Francia,Франция,法国,فرنسا,A,208 10,2654200000 - 2654299999,Société Française du Radiotéléphone
|
60
|
+
France,France,Francia,Франция,法国,فرنسا,A,208 10,2654400000 - 2754099999,Société Française du Radiotéléphone
|
61
|
+
France,France,Francia,Франция,法国,فرنسا,A,208 10,2754200000 - 2754299999,Société Française du Radiotéléphone
|
62
|
+
France,France,Francia,Франция,法国,فرنسا,A,208 10,2754400000 - 9999999999,Société Française du Radiotéléphone
|
63
|
+
Monaco,Monaco,Mónaco,Монако,摩纳哥,موناكو,B,208 10,2654100000 - 2654199999,Société Française du Radiotéléphone
|
64
|
+
Monaco,Monaco,Mónaco,Монако,摩纳哥,موناكو,B,208 10,2654300000 - 2654399999,Société Française du Radiotéléphone
|
65
|
+
Monaco,Monaco,Mónaco,Монако,摩纳哥,موناكو,B,208 10,2754100000 - 2754199999,Société Française du Radiotéléphone
|
66
|
+
Monaco,Monaco,Mónaco,Монако,摩纳哥,موناكو,B,208 10,2754300000 - 2754399999,Société Française du Radiotéléphone
|
67
|
+
France,France,Francia,Франция,法国,فرنسا,A,208 20,0000000000 - 0055499999,Bouygues Telecom
|
68
|
+
France,France,Francia,Франция,法国,فرنسا,A,208 20,0055600000 - 2007199999,Bouygues Telecom
|
69
|
+
France,France,Francia,Франция,法国,فرنسا,A,208 20,2007300000 - 9999999999,Bouygues Telecom
|
70
|
+
Monaco,Monaco,Mónaco,Монако,摩纳哥,موناكو,B,208 20,0055500000 - 0055599999,Bouygues Telecom
|
71
|
+
Monaco,Monaco,Mónaco,Монако,摩纳哥,موناكو,B,208 20,2007200000 - 2007299999,Bouygues Telecom
|
72
|
+
Switzerland,Suisse,Suiza,Швейцария,瑞士,سويسرا,A,228 01,20-35,Swisscom Schweiz AG
|
73
|
+
Switzerland,Suisse,Suiza,Швейцария,瑞士,سويسرا,A,228 01,38,Swisscom Schweiz AG
|
74
|
+
Switzerland,Suisse,Suiza,Швейцария,瑞士,سويسرا,A,228 01,40-44,Swisscom Schweiz AG
|
75
|
+
Switzerland,Suisse,Suiza,Швейцария,瑞士,سويسرا,A,228 01,47,Swisscom Schweiz AG
|
76
|
+
Switzerland,Suisse,Suiza,Швейцария,瑞士,سويسرا,A,228 01,52,Swisscom Schweiz AG
|
77
|
+
Switzerland,Suisse,Suiza,Швейцария,瑞士,سويسرا,A,228 01,59,Swisscom Schweiz AG
|
78
|
+
Switzerland,Suisse,Suiza,Швейцария,瑞士,سويسرا,A,228 01,60-62,Swisscom Schweiz AG
|
79
|
+
Switzerland,Suisse,Suiza,Швейцария,瑞士,سويسرا,A,228 01,72,Swisscom Schweiz AG
|
80
|
+
Switzerland,Suisse,Suiza,Швейцария,瑞士,سويسرا,A,228 01,77,Swisscom Schweiz AG
|
81
|
+
Switzerland,Suisse,Suiza,Швейцария,瑞士,سويسرا,A,228 01,80,Swisscom Schweiz AG
|
82
|
+
Liechtenstein,Liechtenstein,Liechtenstein,Лихтенштейн,列支敦士登,ليختنشتاين,B,228 01,37XXXXXXXX,Swisscom Schweiz AG
|
83
|
+
Luxembourg,Luxembourg,Luxemburgo,Люксембург,卢森堡,أيسلندا,A,270 77,000 x xxx xxx,Tango S.A.
|
84
|
+
Belgium,Belgique,Bélgica,Бельгия,比利时,بلجيكا,B,270 77,800 x xxx xxx,Tango S.A.
|
85
|
+
Belgium,Belgique,Bélgica,Бельгия,比利时,بلجيكا,B,270 77,801 x xxx xxx,Tango S.A.
|
86
|
+
Iceland,Islande,Islandia,Исландия,冰岛,أيسلندا ,A,274 02,0-8,Og fjarskipti hf (Vodafone Iceland)
|
87
|
+
Faroe Islands,Féroé (Iles),Feroe (Islas),Фарерские Острова,法罗群岛,جزر فارويه,B,274 02,9,"P/F Kall, reg. No 2868 (Vodafone FO)"
|
88
|
+
Fiji,Fidji,Fiji,Фиджи,斐济,فيجي ,A,542 02,00xxxxxxxx,Digicel (Fiji) Ltd
|
89
|
+
Nauru,Nauru,Nauru,Науру,瑙鲁,ناورو ,B,542 02,0840xxxxxx,Digicel (Fiji) Ltd
|
@@ -0,0 +1,471 @@
|
|
1
|
+
---
|
2
|
+
metadata:
|
3
|
+
title:
|
4
|
+
en: Extra-territorial use* of MCC/MNC, Annex E to Recommendation ITU-T E.212
|
5
|
+
fr: Utilisation extraterritoriale* du MCC/MNC, Annexe E à la Recommandation UIT-T
|
6
|
+
E.212
|
7
|
+
es: Utilización extraterritorial* de MCC/MNC, Anexo E a la Recomendación UIT-T
|
8
|
+
E.212
|
9
|
+
ru: Экстерриториальное использование* кодов MCC/MNC, Приложение E к Рекомендации
|
10
|
+
МСЭ-T E.212
|
11
|
+
zh: ITU-T E.212建议书附件E,境外使用*MCC/MNC
|
12
|
+
ar: استعمال الرموز MCC/MNC خارج الأراضي الإقليمية*، الملحق E بالتوصية ITU-T E.212
|
13
|
+
locale:
|
14
|
+
country_or_area:
|
15
|
+
en: Country or Geographical Area
|
16
|
+
fr: Pays ou Zone géographique
|
17
|
+
es: País o Zona geografica
|
18
|
+
ru: Страна или географическая зона
|
19
|
+
zh: 国家或地理区域
|
20
|
+
ar: |-
|
21
|
+
البلد
|
22
|
+
أو المنطقة الجغرافية
|
23
|
+
mcc_mnc:
|
24
|
+
en: MCC + MNC**
|
25
|
+
fr: MCC + MNC**
|
26
|
+
es: MCC + MNC**
|
27
|
+
ru: MCC + MNC**
|
28
|
+
zh: MCC + MNC**
|
29
|
+
ar: "**MNC + MCC"
|
30
|
+
msin_range:
|
31
|
+
en: MSIN range***
|
32
|
+
fr: Série de numéros MSIN***
|
33
|
+
es: Gama de MSIN***
|
34
|
+
ru: Диапазон MSIN***
|
35
|
+
zh: 移动用户识别码号段***
|
36
|
+
ar: مدى رقم هوية المشترك المتنقل (MSIN)***
|
37
|
+
operator_network:
|
38
|
+
en: Operator/Network
|
39
|
+
fr: Nom de Réseau/Opérateur
|
40
|
+
es: Nombre de la Red/Operador
|
41
|
+
ru: Оператор/сеть
|
42
|
+
zh: 运营商/网络
|
43
|
+
ar: المشغل/الشبكة
|
44
|
+
note_1:
|
45
|
+
en: As defined in Annex E to Recommendation ITU-T E.212, extra-territorial use
|
46
|
+
of an MCC+MNC is the term used to describe the situation where a MCC+MNC that
|
47
|
+
has been assigned to an operator in one country, Country A, is used in another
|
48
|
+
country, Country B, through a base station established in Country B.
|
49
|
+
fr: Comme défini dans l'Annexe E à la Recommandation UIT-T E.212, l'utilisation
|
50
|
+
extraterritoriale d'une ressource MCC+MNC est l'expression employée pour décrire
|
51
|
+
la situation dans laquelle une ressource MCC+MNC attribuée à un opérateur dans
|
52
|
+
un pays, le pays A, est utilisée dans un autre pays, le pays B, par l'intermédiaire
|
53
|
+
d'une station de base établie dans le pays B.
|
54
|
+
es: Según el Anexo E a la Recomendación UIT-T E.212, la utilización extraterritorial
|
55
|
+
de MCC+MNC es el término que se emplea para describir la situación en que un
|
56
|
+
MCC+MNC asignado a un operador de un país ("País A") se utiliza en otro país
|
57
|
+
("País B") mediante una estación de base establecida en el País B.
|
58
|
+
ru: Согласно определению в Приложении E к Рекомендации МСЭ-T E.212, экстратерриториальное
|
59
|
+
использование кодов MCC+MNC – это термин, применяемый для описания ситуации,
|
60
|
+
при которой коды MCC+MNC, присвоенные оператору в одной стране (страна A), используются
|
61
|
+
в другой стране (страна B) через базовую станцию, установленную в Стране B.
|
62
|
+
zh: 如 ITU-T E.212建议书附件E定义,境外使用的MCC+MNC是用来描述以下情形的术语,即一运营商在一个国家(“国家A”)分配到的MCC+MNC,通过在另一个国家(“国家B”)建立的基站用于国家B
|
63
|
+
ar: استعمال الرمز الثنائي MCC+MNC خارج الأراضي الإقليمية، كما هو معرّف في الملحق
|
64
|
+
E بالتوصية ITU-T E.212، هو المصطلح الذي يستعمل لوصف الحالة التي يكون فيها الرمز
|
65
|
+
الثنائي MCC+MNC المخصص لمشغل في بلد ("بلد A") مستعملاً في بلد آخر ("بلد B")
|
66
|
+
من خلال محطة قاعدة منشأة في البلد B.
|
67
|
+
note_2:
|
68
|
+
en: 'MCC: Mobile Country Code / MNC: Mobile Network Code'
|
69
|
+
fr: 'MCC: Indicatif de pays du mobile / MNC: Code de réseau mobile'
|
70
|
+
es: 'MCC: Indicativo de país para el servicio móvil / MNC: Indicativo de red para
|
71
|
+
el servicio móvil'
|
72
|
+
ru: |-
|
73
|
+
MCC: Код страны в системе подвижной связи/Mobile Country Code
|
74
|
+
MNC: Код сети подвижной связи/Mobile Network Code
|
75
|
+
zh: 'MCC: 移动国家代码 / MNC: 移动网络代码'
|
76
|
+
ar: 'MCC: الرمز الدليلي القُطري للاتصالات المتنقلة / MNC: الرمز الدليلي للشبكة
|
77
|
+
المتنقلة'
|
78
|
+
note_3:
|
79
|
+
en: 'MSIN: Mobile Subscription Identification Number'
|
80
|
+
fr: 'MSIN: numéro d''identification d''abonnement mobile'
|
81
|
+
es: 'MSIN: número de identificación de suscripción al servicio móvil'
|
82
|
+
ru: 'MSIN: Идентификационный номер абонента подвижной связи/Mobile Subscription
|
83
|
+
Identification Number'
|
84
|
+
zh: MSIN:移动订户标识码
|
85
|
+
ar: 'MSIN: رقم تعرف هوية الاشتراك المتنقل'
|
86
|
+
data:
|
87
|
+
- country_or_area:
|
88
|
+
en: France
|
89
|
+
fr: France
|
90
|
+
es: Francia
|
91
|
+
ru: Франция
|
92
|
+
zh: 法国
|
93
|
+
ar: فرنسا
|
94
|
+
country_type: A
|
95
|
+
mcc_mnc: 208 01
|
96
|
+
msin_range: 0000000000-0099999999
|
97
|
+
operator_network: Orange
|
98
|
+
- country_or_area:
|
99
|
+
en: France
|
100
|
+
fr: France
|
101
|
+
es: Francia
|
102
|
+
ru: Франция
|
103
|
+
zh: 法国
|
104
|
+
ar: فرنسا
|
105
|
+
country_type: A
|
106
|
+
mcc_mnc: 208 01
|
107
|
+
msin_range: 0200000000-9999999999
|
108
|
+
operator_network: Orange
|
109
|
+
- country_or_area:
|
110
|
+
en: Monaco
|
111
|
+
fr: Monaco
|
112
|
+
es: Mónaco
|
113
|
+
ru: Монако
|
114
|
+
zh: 摩纳哥
|
115
|
+
ar: موناكو
|
116
|
+
country_type: B
|
117
|
+
mcc_mnc: 208 01
|
118
|
+
msin_range: 0100000000-0199999999
|
119
|
+
operator_network: Orange/Monaco Télécom
|
120
|
+
- country_or_area:
|
121
|
+
en: France
|
122
|
+
fr: France
|
123
|
+
es: Francia
|
124
|
+
ru: Франция
|
125
|
+
zh: 法国
|
126
|
+
ar: فرنسا
|
127
|
+
country_type: A
|
128
|
+
mcc_mnc: 208 10
|
129
|
+
msin_range: 0000000000 - 2654099999
|
130
|
+
operator_network: Société Française du Radiotéléphone
|
131
|
+
- country_or_area:
|
132
|
+
en: France
|
133
|
+
fr: France
|
134
|
+
es: Francia
|
135
|
+
ru: Франция
|
136
|
+
zh: 法国
|
137
|
+
ar: فرنسا
|
138
|
+
country_type: A
|
139
|
+
mcc_mnc: 208 10
|
140
|
+
msin_range: 2654200000 - 2654299999
|
141
|
+
operator_network: Société Française du Radiotéléphone
|
142
|
+
- country_or_area:
|
143
|
+
en: France
|
144
|
+
fr: France
|
145
|
+
es: Francia
|
146
|
+
ru: Франция
|
147
|
+
zh: 法国
|
148
|
+
ar: فرنسا
|
149
|
+
country_type: A
|
150
|
+
mcc_mnc: 208 10
|
151
|
+
msin_range: 2654400000 - 2754099999
|
152
|
+
operator_network: Société Française du Radiotéléphone
|
153
|
+
- country_or_area:
|
154
|
+
en: France
|
155
|
+
fr: France
|
156
|
+
es: Francia
|
157
|
+
ru: Франция
|
158
|
+
zh: 法国
|
159
|
+
ar: فرنسا
|
160
|
+
country_type: A
|
161
|
+
mcc_mnc: 208 10
|
162
|
+
msin_range: 2754200000 - 2754299999
|
163
|
+
operator_network: Société Française du Radiotéléphone
|
164
|
+
- country_or_area:
|
165
|
+
en: France
|
166
|
+
fr: France
|
167
|
+
es: Francia
|
168
|
+
ru: Франция
|
169
|
+
zh: 法国
|
170
|
+
ar: فرنسا
|
171
|
+
country_type: A
|
172
|
+
mcc_mnc: 208 10
|
173
|
+
msin_range: 2754400000 - 9999999999
|
174
|
+
operator_network: Société Française du Radiotéléphone
|
175
|
+
- country_or_area:
|
176
|
+
en: Monaco
|
177
|
+
fr: Monaco
|
178
|
+
es: Mónaco
|
179
|
+
ru: Монако
|
180
|
+
zh: 摩纳哥
|
181
|
+
ar: موناكو
|
182
|
+
country_type: B
|
183
|
+
mcc_mnc: 208 10
|
184
|
+
msin_range: 2654100000 - 2654199999
|
185
|
+
operator_network: Société Française du Radiotéléphone
|
186
|
+
- country_or_area:
|
187
|
+
en: Monaco
|
188
|
+
fr: Monaco
|
189
|
+
es: Mónaco
|
190
|
+
ru: Монако
|
191
|
+
zh: 摩纳哥
|
192
|
+
ar: موناكو
|
193
|
+
country_type: B
|
194
|
+
mcc_mnc: 208 10
|
195
|
+
msin_range: 2654300000 - 2654399999
|
196
|
+
operator_network: Société Française du Radiotéléphone
|
197
|
+
- country_or_area:
|
198
|
+
en: Monaco
|
199
|
+
fr: Monaco
|
200
|
+
es: Mónaco
|
201
|
+
ru: Монако
|
202
|
+
zh: 摩纳哥
|
203
|
+
ar: موناكو
|
204
|
+
country_type: B
|
205
|
+
mcc_mnc: 208 10
|
206
|
+
msin_range: 2754100000 - 2754199999
|
207
|
+
operator_network: Société Française du Radiotéléphone
|
208
|
+
- country_or_area:
|
209
|
+
en: Monaco
|
210
|
+
fr: Monaco
|
211
|
+
es: Mónaco
|
212
|
+
ru: Монако
|
213
|
+
zh: 摩纳哥
|
214
|
+
ar: موناكو
|
215
|
+
country_type: B
|
216
|
+
mcc_mnc: 208 10
|
217
|
+
msin_range: 2754300000 - 2754399999
|
218
|
+
operator_network: Société Française du Radiotéléphone
|
219
|
+
- country_or_area:
|
220
|
+
en: France
|
221
|
+
fr: France
|
222
|
+
es: Francia
|
223
|
+
ru: Франция
|
224
|
+
zh: 法国
|
225
|
+
ar: فرنسا
|
226
|
+
country_type: A
|
227
|
+
mcc_mnc: 208 20
|
228
|
+
msin_range: 0000000000 - 0055499999
|
229
|
+
operator_network: Bouygues Telecom
|
230
|
+
- country_or_area:
|
231
|
+
en: France
|
232
|
+
fr: France
|
233
|
+
es: Francia
|
234
|
+
ru: Франция
|
235
|
+
zh: 法国
|
236
|
+
ar: فرنسا
|
237
|
+
country_type: A
|
238
|
+
mcc_mnc: 208 20
|
239
|
+
msin_range: 0055600000 - 2007199999
|
240
|
+
operator_network: Bouygues Telecom
|
241
|
+
- country_or_area:
|
242
|
+
en: France
|
243
|
+
fr: France
|
244
|
+
es: Francia
|
245
|
+
ru: Франция
|
246
|
+
zh: 法国
|
247
|
+
ar: فرنسا
|
248
|
+
country_type: A
|
249
|
+
mcc_mnc: 208 20
|
250
|
+
msin_range: 2007300000 - 9999999999
|
251
|
+
operator_network: Bouygues Telecom
|
252
|
+
- country_or_area:
|
253
|
+
en: Monaco
|
254
|
+
fr: Monaco
|
255
|
+
es: Mónaco
|
256
|
+
ru: Монако
|
257
|
+
zh: 摩纳哥
|
258
|
+
ar: موناكو
|
259
|
+
country_type: B
|
260
|
+
mcc_mnc: 208 20
|
261
|
+
msin_range: 0055500000 - 0055599999
|
262
|
+
operator_network: Bouygues Telecom
|
263
|
+
- country_or_area:
|
264
|
+
en: Monaco
|
265
|
+
fr: Monaco
|
266
|
+
es: Mónaco
|
267
|
+
ru: Монако
|
268
|
+
zh: 摩纳哥
|
269
|
+
ar: موناكو
|
270
|
+
country_type: B
|
271
|
+
mcc_mnc: 208 20
|
272
|
+
msin_range: 2007200000 - 2007299999
|
273
|
+
operator_network: Bouygues Telecom
|
274
|
+
- country_or_area:
|
275
|
+
en: Switzerland
|
276
|
+
fr: Suisse
|
277
|
+
es: Suiza
|
278
|
+
ru: Швейцария
|
279
|
+
zh: 瑞士
|
280
|
+
ar: سويسرا
|
281
|
+
country_type: A
|
282
|
+
mcc_mnc: 228 01
|
283
|
+
msin_range: 20-35
|
284
|
+
operator_network: Swisscom Schweiz AG
|
285
|
+
- country_or_area:
|
286
|
+
en: Switzerland
|
287
|
+
fr: Suisse
|
288
|
+
es: Suiza
|
289
|
+
ru: Швейцария
|
290
|
+
zh: 瑞士
|
291
|
+
ar: سويسرا
|
292
|
+
country_type: A
|
293
|
+
mcc_mnc: 228 01
|
294
|
+
msin_range: '38'
|
295
|
+
operator_network: Swisscom Schweiz AG
|
296
|
+
- country_or_area:
|
297
|
+
en: Switzerland
|
298
|
+
fr: Suisse
|
299
|
+
es: Suiza
|
300
|
+
ru: Швейцария
|
301
|
+
zh: 瑞士
|
302
|
+
ar: سويسرا
|
303
|
+
country_type: A
|
304
|
+
mcc_mnc: 228 01
|
305
|
+
msin_range: 40-44
|
306
|
+
operator_network: Swisscom Schweiz AG
|
307
|
+
- country_or_area:
|
308
|
+
en: Switzerland
|
309
|
+
fr: Suisse
|
310
|
+
es: Suiza
|
311
|
+
ru: Швейцария
|
312
|
+
zh: 瑞士
|
313
|
+
ar: سويسرا
|
314
|
+
country_type: A
|
315
|
+
mcc_mnc: 228 01
|
316
|
+
msin_range: '47'
|
317
|
+
operator_network: Swisscom Schweiz AG
|
318
|
+
- country_or_area:
|
319
|
+
en: Switzerland
|
320
|
+
fr: Suisse
|
321
|
+
es: Suiza
|
322
|
+
ru: Швейцария
|
323
|
+
zh: 瑞士
|
324
|
+
ar: سويسرا
|
325
|
+
country_type: A
|
326
|
+
mcc_mnc: 228 01
|
327
|
+
msin_range: '52'
|
328
|
+
operator_network: Swisscom Schweiz AG
|
329
|
+
- country_or_area:
|
330
|
+
en: Switzerland
|
331
|
+
fr: Suisse
|
332
|
+
es: Suiza
|
333
|
+
ru: Швейцария
|
334
|
+
zh: 瑞士
|
335
|
+
ar: سويسرا
|
336
|
+
country_type: A
|
337
|
+
mcc_mnc: 228 01
|
338
|
+
msin_range: '59'
|
339
|
+
operator_network: Swisscom Schweiz AG
|
340
|
+
- country_or_area:
|
341
|
+
en: Switzerland
|
342
|
+
fr: Suisse
|
343
|
+
es: Suiza
|
344
|
+
ru: Швейцария
|
345
|
+
zh: 瑞士
|
346
|
+
ar: سويسرا
|
347
|
+
country_type: A
|
348
|
+
mcc_mnc: 228 01
|
349
|
+
msin_range: 60-62
|
350
|
+
operator_network: Swisscom Schweiz AG
|
351
|
+
- country_or_area:
|
352
|
+
en: Switzerland
|
353
|
+
fr: Suisse
|
354
|
+
es: Suiza
|
355
|
+
ru: Швейцария
|
356
|
+
zh: 瑞士
|
357
|
+
ar: سويسرا
|
358
|
+
country_type: A
|
359
|
+
mcc_mnc: 228 01
|
360
|
+
msin_range: '72'
|
361
|
+
operator_network: Swisscom Schweiz AG
|
362
|
+
- country_or_area:
|
363
|
+
en: Switzerland
|
364
|
+
fr: Suisse
|
365
|
+
es: Suiza
|
366
|
+
ru: Швейцария
|
367
|
+
zh: 瑞士
|
368
|
+
ar: سويسرا
|
369
|
+
country_type: A
|
370
|
+
mcc_mnc: 228 01
|
371
|
+
msin_range: '77'
|
372
|
+
operator_network: Swisscom Schweiz AG
|
373
|
+
- country_or_area:
|
374
|
+
en: Switzerland
|
375
|
+
fr: Suisse
|
376
|
+
es: Suiza
|
377
|
+
ru: Швейцария
|
378
|
+
zh: 瑞士
|
379
|
+
ar: سويسرا
|
380
|
+
country_type: A
|
381
|
+
mcc_mnc: 228 01
|
382
|
+
msin_range: '80'
|
383
|
+
operator_network: Swisscom Schweiz AG
|
384
|
+
- country_or_area:
|
385
|
+
en: Liechtenstein
|
386
|
+
fr: Liechtenstein
|
387
|
+
es: Liechtenstein
|
388
|
+
ru: Лихтенштейн
|
389
|
+
zh: 列支敦士登
|
390
|
+
ar: ليختنشتاين
|
391
|
+
country_type: B
|
392
|
+
mcc_mnc: 228 01
|
393
|
+
msin_range: 37XXXXXXXX
|
394
|
+
operator_network: Swisscom Schweiz AG
|
395
|
+
- country_or_area:
|
396
|
+
en: Luxembourg
|
397
|
+
fr: Luxembourg
|
398
|
+
es: Luxemburgo
|
399
|
+
ru: Люксембург
|
400
|
+
zh: 卢森堡
|
401
|
+
ar: أيسلندا
|
402
|
+
country_type: A
|
403
|
+
mcc_mnc: 270 77
|
404
|
+
msin_range: 000 x xxx xxx
|
405
|
+
operator_network: Tango S.A.
|
406
|
+
- country_or_area:
|
407
|
+
en: Belgium
|
408
|
+
fr: Belgique
|
409
|
+
es: Bélgica
|
410
|
+
ru: Бельгия
|
411
|
+
zh: 比利时
|
412
|
+
ar: بلجيكا
|
413
|
+
country_type: B
|
414
|
+
mcc_mnc: 270 77
|
415
|
+
msin_range: 800 x xxx xxx
|
416
|
+
operator_network: Tango S.A.
|
417
|
+
- country_or_area:
|
418
|
+
en: Belgium
|
419
|
+
fr: Belgique
|
420
|
+
es: Bélgica
|
421
|
+
ru: Бельгия
|
422
|
+
zh: 比利时
|
423
|
+
ar: بلجيكا
|
424
|
+
country_type: B
|
425
|
+
mcc_mnc: 270 77
|
426
|
+
msin_range: 801 x xxx xxx
|
427
|
+
operator_network: Tango S.A.
|
428
|
+
- country_or_area:
|
429
|
+
en: Iceland
|
430
|
+
fr: Islande
|
431
|
+
es: Islandia
|
432
|
+
ru: Исландия
|
433
|
+
zh: 冰岛
|
434
|
+
ar: أيسلندا
|
435
|
+
country_type: A
|
436
|
+
mcc_mnc: 274 02
|
437
|
+
msin_range: 0-8
|
438
|
+
operator_network: Og fjarskipti hf (Vodafone Iceland)
|
439
|
+
- country_or_area:
|
440
|
+
en: Faroe Islands
|
441
|
+
fr: Féroé (Iles)
|
442
|
+
es: Feroe (Islas)
|
443
|
+
ru: Фарерские Острова
|
444
|
+
zh: 法罗群岛
|
445
|
+
ar: جزر فارويه
|
446
|
+
country_type: B
|
447
|
+
mcc_mnc: 274 02
|
448
|
+
msin_range: '9'
|
449
|
+
operator_network: P/F Kall, reg. No 2868 (Vodafone FO)
|
450
|
+
- country_or_area:
|
451
|
+
en: Fiji
|
452
|
+
fr: Fidji
|
453
|
+
es: Fiji
|
454
|
+
ru: Фиджи
|
455
|
+
zh: 斐济
|
456
|
+
ar: فيجي
|
457
|
+
country_type: A
|
458
|
+
mcc_mnc: 542 02
|
459
|
+
msin_range: 00xxxxxxxx
|
460
|
+
operator_network: Digicel (Fiji) Ltd
|
461
|
+
- country_or_area:
|
462
|
+
en: Nauru
|
463
|
+
fr: Nauru
|
464
|
+
es: Nauru
|
465
|
+
ru: Науру
|
466
|
+
zh: 瑙鲁
|
467
|
+
ar: ناورو
|
468
|
+
country_type: B
|
469
|
+
mcc_mnc: 542 02
|
470
|
+
msin_range: '0840xxxxxx'
|
471
|
+
operator_network: Digicel (Fiji) Ltd
|