There is an ISO standard for Country code, but none (that I can find) for city code. There is, however;
a
United Nations Economic Commission for Europe
United Nations Code for Trade and Transport Locations system of city identification UN/LOCODE.
Edit: Lined out the wrong name, added the slash to the UN/LOCODE name.