Some caveats:
See the ISO-4 for general rules, e.g.:
Based on the 2017-09-14 version of the LTWA.
Report issues at GitHub