title: asp.net core linux - CultureInfo get country code
body: <p>I am having issues validating country code on <strong>Linux</strong>. Following is the code sample:</p>
  
  <pre><code>using System;
  using System.Globalization;
  using System.Linq;
  
  public class Program
  {
      public static void Main()
      {
          Console.WriteLine(IsCountryCodeValid("IN"));
      }
  
      public static bool IsCountryCodeValid(string countryCode)
      {
          return CultureInfo
              .GetCultures(CultureTypes.SpecificCultures)
              .Select(culture =&gt; new RegionInfo(culture.Name))
              .Any(region =&gt; region.TwoLetterISORegionName == countryCode);
      }
  }
  </code></pre>
  
  <p>It works on <strong>Windows</strong> and <strong>macOS</strong> returning <strong>true</strong>, but when the code runs on <strong>Heroku</strong> in a docker, the above code returns false.</p>