Repository: yt-dlp
Issue: Error in processing of ISO 639-1 codes
Labels: bug,core:post-processor

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting a bug unrelated to a specific site
- [X] I've verified that I'm running yt-dlp version **2023.10.07** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

### Provide a description that is worded well enough to be understood

`yt-dlp` incorrectly converts 2-character ISO language codes (ISO 639-1 Code) to 3-character codes (ISO 639-2 Code). 

As can be traced at [www.loc.gov/standards](https://www.loc.gov/standards/iso639-2/php/code_list.php), Czechia uses `cs` for 2-character[^1] and two possible 3-character codes, namely `cze` (/B) and `ces` (/T).

[^1]: `cz` is very often wrongly used to indicate the language, but this is ISO 3166-1 alpha-2 to indicate the country. However, `cz` works all right here.

The `yt-dlp` performs the conversion in the function [`short2long(cls, code)`](https://github.com/yt-dlp/yt-dlp/blob/84e26038d4002e763ea51ca1bdce4f7e63c540bf/yt_dlp/utils/_utils.py#L3736) by inappropriately brute-force cutting the last character off.

Some content providers use the /T variant of `ces` for Czech audio tracks, e.g. Czech Television – public service broadcaster. Cutting off results in a calling `short2long("ce")` which does not represent Czech but Chechen, and the resulting 3-character ISO 639-2 code is `che` instead of `cze`. Calling `short2long("cz")` (from `cz|e`) works fine.

This corrupts the metatags. As a result, video players ignore the Chechen audio track instead of preferring the Czech one.

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [ ] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-vU']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2023.10.09.183051 [84e26038d] (linux_exe)
[debug] Python 3.10.12 (CPython x86_64 64bit) - Linux-6.1.56-1-lts-x86_64-with-glibc2.38 (OpenSSL 3.1.3 19 Sep 2023, glibc 2.38)
[debug] exe versions: ffmpeg 6.0 (setts), ffprobe 6.0
[debug] Optional libraries: Cryptodome-3.19.0, brotli-1.1.0, certifi-2023.07.22, mutagen-1.47.0, sqlite3-3.43.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1887 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Available version: nightly@2023.10.09.183051, Current version: nightly@2023.10.09.183051
Current Build Hash: 60a74634bf33533db3b0985aa9b04146e2e5303f6d1d4ab83d6c72c123a63941
yt-dlp is up to date (nightly@2023.10.09.183051)
```