Some caveats:
See the ISO-4 for general rules, e.g.:
Based on the 2021-07-02 version of the LTWA (latest as of 2023-09-01).
Report issues at GitHub