I recently worked on a site that required a country selector with related country codes (using the two-letter ones) and I couldn't find a ready-made library for this, so I scraped wikipedia and did some conversion to make these two quick libraries, one for php and one for python in an associative array and a dict, respectively. The python one sets an encoding at the top of the file, so I am not totally sure about the compatibility, but it seems to handle the special characters fine.