Issue
Other than Locale.getISOCountries()
that is, because I'm already getting some strange errors with that. What else is the best way to get the 2-letter country codes as well as the full country name?
Solution
For a separate project, I took the country code data from the ISO site.
Beware of the following:
- The names are in all caps. You will probably want to tweak it so it's not.
- The names are not all in simple ASCII.
- The names are not entirely political neutral (it is probably impossible for any purported list of countries to be). E.g., "Taiwan, Province of China" is a name. A good starting point to learn about the issues is this blog post.
Answered By - user85509