Commits

Anonymous committed 7686139

CPP: libphonenumber 4.5

Comments (0)

Files changed (7)

cpp/src/phonenumbers/asyoutypeformatter.cc

   national_number_.assign(number_without_country_code);
   string new_region_code;
   phone_util_.GetRegionCodeForCountryCode(country_code, &new_region_code);
-
-  if (new_region_code != default_country_) {
+  if (PhoneNumberUtil::kRegionCodeForNonGeoEntity == new_region_code) {
+    current_metadata_ =
+        phone_util_.GetMetadataForNonGeographicalRegion(country_code);
+  } else if (new_region_code != default_country_) {
     current_metadata_ = GetMetadataForRegion(new_region_code);
   }
   StrAppend(&prefix_before_national_number_, country_code, " ");