Skip to content

Commit b3a5bc4

Browse files
committed
Added alphabets
1 parent e2c4bcb commit b3a5bc4

5 files changed

Lines changed: 308 additions & 197 deletions

File tree

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,24 @@ To run the Javascript unit tests, simply open the file `unittest/unittest/html`.
4747

4848
# Version History
4949

50+
51+
* 2.4.0
52+
53+
Added scripts for Korean (Choson'gul / Hangul), Burmese, Khmer, Sinhalese, Thaana (Maldivan),
54+
Chinese (Zhuyin, Bopomofo), Tifinagh (Berber), Tamil, Amharic, Telugu, Odia, Kannada, Gujarati.
55+
56+
Renamed language strings to more correct terms (Malay to Malayalam; Hindi to Devanagari).
57+
58+
Added var `alphabetsForTerritory[t]`, returning the most commonly used alphabets for territory `t`.
59+
60+
Improved some characters for Arabic and Devanagari.
61+
62+
Fixed Bengali to also support Assamese.
63+
64+
For some alphabets, removed recognition of letters `I` and/or `O` unless looking like digits `1` and/or `0`.
65+
66+
Replaced internal encoded `entity_iso[]` array by non-encoded `iso3166alpha[]`.
67+
5068
* 2.3.1
5169

5270
Minor fixes to prevent some compiler warnings, or multiple inclusion of `.h` files.

ctrynams.js

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17-
// *** GENERATED FILE, DO NOT CHANGE OR PRETTIFY ***
17+
// *** GENERATED FILE (coords.cpp), DO NOT CHANGE OR PRETTIFY ***
1818

1919
var isofullname = [
20-
"Vatican City State (Holy See)",
20+
"Vatican (Holy See) (_ City State)",
2121
"Monaco (Principality of _)",
2222
"Gibraltar",
2323
"Tokelau",
@@ -28,8 +28,8 @@ var isofullname = [
2828
"Macau (Aomen)",
2929
"Sint Maarten",
3030
"Saint Martin (Collectivity of _)",
31-
"Norfolk and Philip Island (Philip Island)",
32-
"Pitcairn Group of Islands",
31+
"Norfolk and Philip Island (Philip Island) (Norfolk Island)",
32+
"Pitcairn Islands (Pitcairn, Henderson, Ducie and Oeno Islands)",
3333
"Bouvet Island",
3434
"Bermuda (Somers Isles)",
3535
"British Indian Ocean Territory",
@@ -39,29 +39,29 @@ var isofullname = [
3939
"Montserrat",
4040
"Jersey (Bailiwick of _)",
4141
"Christmas Island",
42-
"Wallis and Futuna (Futuna) (Collectivity of the _ Islands)",
42+
"Wallis and Futuna (Futuna) (Wallis) (Collectivity of the _ Islands)",
4343
"British Virgin Islands (Virgin Islands, British)",
4444
"Liechtenstein (Principality of _)",
4545
"Aruba",
4646
"Marshall Islands (Republic of the _)",
4747
"American Samoa (Samoa, American)",
4848
"Cook Islands",
49-
"Saint Pierre and Miquelon (Miquelon) (Collectivity of _)",
49+
"Saint Pierre and Miquelon (Miquelon) (Saint Pierre) (Collectivity of _)",
5050
"Niue",
51-
"Saint Kitts and Nevis (Nevis) (Federation of _)",
51+
"Saint Kitts and Nevis (Nevis) (Saint Kitts) (Federation of _)",
5252
"Cayman islands",
53-
"Bonaire, St Eustasuis and Saba (Saba) (St Eustasius)",
53+
"Bonaire, St Eustasuis and Saba (Bonaire) (Saba) (St Eustasius)",
5454
"Maldives (Republic of _)",
55-
"Saint Helena, Ascension and Tristan da Cunha (Ascension) (Tristan da Cunha)",
55+
"Saint Helena, Ascension and Tristan da Cunha (Saint Helena) (Ascension) (Tristan da Cunha)",
5656
"Malta (Republic of _)",
5757
"Grenada",
5858
"Virgin Islands of the United States (US Virgin Islands) (American Virgin Islands)",
5959
"Mayotte (Maore)",
60-
"Svalbard and Jan Mayen (Jan Mayen) (Spitsbergen)",
61-
"Saint Vincent and the Grenadines (Grenadines)",
62-
"Heard Island and McDonald Islands (McDonald Islands)",
60+
"Svalbard and Jan Mayen (Svalbard) (Jan Mayen) (Spitsbergen)",
61+
"Saint Vincent and the Grenadines (Saint Vincent) (Grenadines)",
62+
"Heard Island and McDonald Islands (Heard Island) (McDonald Islands)",
6363
"Barbados",
64-
"Antigua and Barbuda (Barbuda)",
64+
"Antigua and Barbuda (Antigua) (Barbuda)",
6565
"Curacao",
6666
"Seychelles (Republic of _)",
6767
"Palau (Republic of _)",
@@ -76,8 +76,8 @@ var isofullname = [
7676
"Dominica (Commonwealth of _)",
7777
"Bahrain (Kingdom of _)",
7878
"Kiribati (Republic of _)",
79-
"Turks and Caicos Islands (Caicos Islands)",
80-
"Sao Tome and Principe (Principe) (Democratic Republic of _)",
79+
"Turks and Caicos Islands (Turks Islands) (Caicos Islands)",
80+
"Sao Tome and Principe (Sao Tome) (Principe) (Democratic Republic of _)",
8181
"Hong Kong (Xianggang)",
8282
"Martinique",
8383
"Faroe Islands",
@@ -87,10 +87,10 @@ var isofullname = [
8787
"Reunion",
8888
"Luxembourg (Grand Duchy of _)",
8989
"Samoa (Independent State of _)",
90-
"South Georgia and the South Sandwich Islands (South Sandwich Islands)",
90+
"South Georgia and the South Sandwich Islands (South Georgia) (South Sandwich Islands)",
9191
"French Polynesia (Collectivity of _)",
9292
"Cape Verde (Cabo Verde) (Republic of Cabo Verde)",
93-
"Trinidad and Tobago (Republic of _) (Tobago)",
93+
"Trinidad and Tobago (Republic of _) (Trinidad) (Tobago)",
9494
"Brunei (Nation of _, the Abode of Peace)",
9595
"French Southern and Antarctic Lands",
9696
"Puerto Rico (Commonwealth of _)",
@@ -99,7 +99,7 @@ var isofullname = [
9999
"Jamaica",
100100
"Gambia (The Gambia) (Republic of the _)",
101101
"Qatar (State of _)",
102-
"Falkland Islands",
102+
"Falkland Islands (The Falklands)",
103103
"Vanuatu (Republic of _)",
104104
"Montenegro",
105105
"Bahamas (Commonwealth of the _)",
@@ -154,7 +154,7 @@ var isofullname = [
154154
"Jordan (Hashemite Kingdom of _) (Kingdom of _)",
155155
"Portugal (Portuguese Republic)",
156156
"Hungary (Republic of _)",
157-
"South Korea (Republic of Korea)",
157+
"South Korea (Republic of Korea) (Korea, South)",
158158
"Iceland",
159159
"Guatemala (Republic of _)",
160160
"Cuba (Republic of _)",
@@ -164,9 +164,9 @@ var isofullname = [
164164
"Benin (Republic of _)",
165165
"Eritrea (State of _)",
166166
"Malawi (Republic of _)",
167-
"North Korea (Democratic People's Republic of Korea)",
167+
"North Korea (Democratic People's Republic of Korea) (Korea, North)",
168168
"Nicaragua (Republic of _)",
169-
"Greece (Hellenic Republic)",
169+
"Greece (Hellenic Republic) (Hellas)",
170170
"Tajikistan (Republic of _)",
171171
"Bangladesh (People's Republic of _)",
172172
"Nepal (Federal Democratic Republic of _)",
@@ -183,7 +183,7 @@ var isofullname = [
183183
"Romania",
184184
"Ghana (Republic of _)",
185185
"Uganda (Republic of _)",
186-
"United Kingdom (Scotland) (Great Britain) (Northern Ireland) (Ireland, Northern) (Britain) (United Kingdom of Great Britain and Northern Ireland)",
186+
"United Kingdom (Scotland) (Great Britain) (England) (Northern Ireland) (Ireland, Northern) (Britain) (United Kingdom of Great Britain and Northern Ireland)",
187187
"Guinea (Republic of _) (Guinea-Conakry)",
188188
"Ecuador (Republic of _)",
189189
"Western Sahara (Sahrawi Arab Democratic Republic)",
@@ -289,9 +289,9 @@ var isofullname = [
289289
"Kazakhstan (Republic of _)",
290290
"Argentina (Argentine Republic)",
291291
"Daman and Diu",
292-
"Dadra and Nagar Haveli",
292+
"Dadra and Nagar Haveli (Dadra) (Nagar Haveli)",
293293
"Chandigarh",
294-
"Andaman and Nicobar",
294+
"Andaman and Nicobar (Andaman) (Nicobar)",
295295
"Lakshadweep",
296296
"Delhi (National Capital Territory of _)",
297297
"Meghalaya",
@@ -310,7 +310,7 @@ var isofullname = [
310310
"Kerala",
311311
"Tamil Nadu",
312312
"Himachal Pradesh",
313-
"Jammu and Kashmir",
313+
"Jammu and Kashmir (Jammu) (Kashmir)",
314314
"Chhattisgarh",
315315
"Jharkhand",
316316
"Karnataka",
@@ -417,7 +417,7 @@ var isofullname = [
417417
"Quebec",
418418
"Saskatchewan",
419419
"Manitoba",
420-
"Newfoundland and Labrador (Labrador)",
420+
"Newfoundland and Labrador (Newfoundland) (Labrador)",
421421
"New Brunswick",
422422
"Nova Scotia",
423423
"Prince Edward Island",

ctrynams_short.js

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17-
// *** GENERATED FILE, DO NOT CHANGE OR PRETTIFY ***
17+
// *** GENERATED FILE (coords.cpp), DO NOT CHANGE OR PRETTIFY ***
1818

1919
var isofullname = [
20-
"Vatican City State (Holy See)",
20+
"Vatican (Holy See)",
2121
"Monaco",
2222
"Gibraltar",
2323
"Tokelau",
@@ -28,8 +28,8 @@ var isofullname = [
2828
"Macau (Aomen)",
2929
"Sint Maarten",
3030
"Saint Martin",
31-
"Norfolk and Philip Island (Philip Island)",
32-
"Pitcairn Group of Islands",
31+
"Norfolk and Philip Island (Philip Island) (Norfolk Island)",
32+
"Pitcairn Islands (Pitcairn, Henderson, Ducie and Oeno Islands)",
3333
"Bouvet Island",
3434
"Bermuda (Somers Isles)",
3535
"British Indian Ocean Territory",
@@ -39,29 +39,29 @@ var isofullname = [
3939
"Montserrat",
4040
"Jersey",
4141
"Christmas Island",
42-
"Wallis and Futuna (Futuna)",
42+
"Wallis and Futuna (Futuna) (Wallis)",
4343
"British Virgin Islands (Virgin Islands, British)",
4444
"Liechtenstein",
4545
"Aruba",
4646
"Marshall Islands",
4747
"American Samoa (Samoa, American)",
4848
"Cook Islands",
49-
"Saint Pierre and Miquelon (Miquelon)",
49+
"Saint Pierre and Miquelon (Miquelon) (Saint Pierre)",
5050
"Niue",
51-
"Saint Kitts and Nevis (Nevis)",
51+
"Saint Kitts and Nevis (Nevis) (Saint Kitts)",
5252
"Cayman islands",
53-
"Bonaire, St Eustasuis and Saba (Saba) (St Eustasius)",
53+
"Bonaire, St Eustasuis and Saba (Bonaire) (Saba) (St Eustasius)",
5454
"Maldives",
55-
"Saint Helena, Ascension and Tristan da Cunha (Ascension) (Tristan da Cunha)",
55+
"Saint Helena, Ascension and Tristan da Cunha (Saint Helena) (Ascension) (Tristan da Cunha)",
5656
"Malta",
5757
"Grenada",
5858
"Virgin Islands of the United States (US Virgin Islands) (American Virgin Islands)",
5959
"Mayotte (Maore)",
60-
"Svalbard and Jan Mayen (Jan Mayen) (Spitsbergen)",
61-
"Saint Vincent and the Grenadines (Grenadines)",
62-
"Heard Island and McDonald Islands (McDonald Islands)",
60+
"Svalbard and Jan Mayen (Svalbard) (Jan Mayen) (Spitsbergen)",
61+
"Saint Vincent and the Grenadines (Saint Vincent) (Grenadines)",
62+
"Heard Island and McDonald Islands (Heard Island) (McDonald Islands)",
6363
"Barbados",
64-
"Antigua and Barbuda (Barbuda)",
64+
"Antigua and Barbuda (Antigua) (Barbuda)",
6565
"Curacao",
6666
"Seychelles",
6767
"Palau",
@@ -76,8 +76,8 @@ var isofullname = [
7676
"Dominica",
7777
"Bahrain",
7878
"Kiribati",
79-
"Turks and Caicos Islands (Caicos Islands)",
80-
"Sao Tome and Principe (Principe)",
79+
"Turks and Caicos Islands (Turks Islands) (Caicos Islands)",
80+
"Sao Tome and Principe (Sao Tome) (Principe)",
8181
"Hong Kong (Xianggang)",
8282
"Martinique",
8383
"Faroe Islands",
@@ -87,10 +87,10 @@ var isofullname = [
8787
"Reunion",
8888
"Luxembourg",
8989
"Samoa",
90-
"South Georgia and the South Sandwich Islands (South Sandwich Islands)",
90+
"South Georgia and the South Sandwich Islands (South Georgia) (South Sandwich Islands)",
9191
"French Polynesia",
9292
"Cape Verde (Cabo Verde) (Republic of Cabo Verde)",
93-
"Trinidad and Tobago (Tobago)",
93+
"Trinidad and Tobago (Trinidad) (Tobago)",
9494
"Brunei",
9595
"French Southern and Antarctic Lands",
9696
"Puerto Rico",
@@ -99,7 +99,7 @@ var isofullname = [
9999
"Jamaica",
100100
"Gambia (The Gambia)",
101101
"Qatar",
102-
"Falkland Islands",
102+
"Falkland Islands (The Falklands)",
103103
"Vanuatu",
104104
"Montenegro",
105105
"Bahamas",
@@ -154,7 +154,7 @@ var isofullname = [
154154
"Jordan",
155155
"Portugal (Portuguese Republic)",
156156
"Hungary",
157-
"South Korea (Republic of Korea)",
157+
"South Korea (Republic of Korea) (Korea, South)",
158158
"Iceland",
159159
"Guatemala",
160160
"Cuba",
@@ -164,9 +164,9 @@ var isofullname = [
164164
"Benin",
165165
"Eritrea",
166166
"Malawi",
167-
"North Korea (Democratic People's Republic of Korea)",
167+
"North Korea (Democratic People's Republic of Korea) (Korea, North)",
168168
"Nicaragua",
169-
"Greece (Hellenic Republic)",
169+
"Greece (Hellenic Republic) (Hellas)",
170170
"Tajikistan",
171171
"Bangladesh",
172172
"Nepal",
@@ -183,7 +183,7 @@ var isofullname = [
183183
"Romania",
184184
"Ghana",
185185
"Uganda",
186-
"United Kingdom (Scotland) (Great Britain) (Northern Ireland) (Ireland, Northern) (Britain) (United Kingdom of Great Britain and Northern Ireland)",
186+
"United Kingdom (Scotland) (Great Britain) (England) (Northern Ireland) (Ireland, Northern) (Britain) (United Kingdom of Great Britain and Northern Ireland)",
187187
"Guinea (Guinea-Conakry)",
188188
"Ecuador",
189189
"Western Sahara (Sahrawi Arab Democratic Republic)",
@@ -289,9 +289,9 @@ var isofullname = [
289289
"Kazakhstan",
290290
"Argentina (Argentine Republic)",
291291
"Daman and Diu",
292-
"Dadra and Nagar Haveli",
292+
"Dadra and Nagar Haveli (Dadra) (Nagar Haveli)",
293293
"Chandigarh",
294-
"Andaman and Nicobar",
294+
"Andaman and Nicobar (Andaman) (Nicobar)",
295295
"Lakshadweep",
296296
"Delhi",
297297
"Meghalaya",
@@ -310,7 +310,7 @@ var isofullname = [
310310
"Kerala",
311311
"Tamil Nadu",
312312
"Himachal Pradesh",
313-
"Jammu and Kashmir",
313+
"Jammu and Kashmir (Jammu) (Kashmir)",
314314
"Chhattisgarh",
315315
"Jharkhand",
316316
"Karnataka",
@@ -417,7 +417,7 @@ var isofullname = [
417417
"Quebec",
418418
"Saskatchewan",
419419
"Manitoba",
420-
"Newfoundland and Labrador (Labrador)",
420+
"Newfoundland and Labrador (Newfoundland) (Labrador)",
421421
"New Brunswick",
422422
"Nova Scotia",
423423
"Prince Edward Island",

0 commit comments

Comments
 (0)