+
+ try {
+ // Read icuregions file to collect ICU's own zone-region mapping data.
+ ifstream frg(ICU_REGIONS);
+ if (frg) {
+ string line;
+ while (getline(frg, line)) {
+ if (line[0] == '#') continue;
+
+ string zone, country;
+ istringstream is(line);
+ is >> zone >> country;
+ if (zone.size() == 0) continue;
+ if (country.size() < 2) {
+ cerr << "Error: Can't parse " << line << " in " << ICU_REGIONS << endl;
+ return 1;
+ }
+ icuRegions[zone] = country;
+ }
+ } else {
+ cout << "No custom region map [icuregions]" << endl;
+ }
+ } catch (const exception& error) {
+ cerr << "Error: While reading " << ICU_REGIONS << ": " << error.what() << endl;
+ return 1;
+ }
+