mc/tests/lib
Yury V. Zaytsev 1e0e6b5e1e charset: rename IBM866 to CP866 for iconv and adjust charset names for codeset
```
linux $ iconv -l | grep 866
866//
866NAV//
CP866//
CP866NAV//
CSIBM866//
IBM866//
IBM866NAV//

solaris $ iconv -l | grep 866
    CP866 (CP866, CP-866, CP_866, 866),
    IBM-866,

macos % iconv -l | grep 866
CP866 866 CSIBM866 IBM866 MSCP866

musl/src/locale/codepages.h: "cp866\0"
```

On glibc-based systems, codeset will be set to charmap name, on most other systems it seems to be taken from locale name.

## Linux

```
zaytsev@fedora:~$ locale -a | grep ru
ru_RU
ru_RU.cp866
ru_RU.ibm866
ru_RU.iso88595
ru_RU.koi8r
ru_RU.utf8
russian
ru_UA
ru_UA.koi8u
ru_UA.utf8

zaytsev@fedora:~/src$ LC_ALL=ru_RU.cp866 LANG=ru_RU.cp866 ./a.out
IBM866

zaytsev@fedora:~/src$ LC_ALL=ru_RU.koi8r LANG=ru_RU.koi8r ./a.out
KOI8-R

zaytsev@fedora:~/src$ LC_ALL=ru_RU.iso88595 LANG=ru_RU.iso88595 ./a.out
ISO-8859-5
```

## macOS

```
ru_RU.ISO8859-5
ru_RU.CP866
ru_RU.CP1251
ru_RU.UTF-8
ru_RU.KOI8-R
ru_RU

zaytsev@Yurys-MBP mc % LANG=ru_RU.CP866 LC_ALL=ru_RU.CP866 ./a.out
CP866

zaytsev@Yurys-MBP mc % LANG=ru_RU.ISO8859-5 LC_ALL=ru_RU.ISO8859-5 ./a.out
ISO8859-5
```

## FreeBSD

```
ru_RU.CP1251
ru_RU.CP866
ru_RU.ISO8859-5
ru_RU.KOI8-R
ru_RU.UTF-8

zaytsev@cfarm240:~ $ LANG=ru_RU.ISO8859-5 LC_ALL=ru_RU.ISO8859-5 ./a.out
ISO8859-5

zaytsev@cfarm240:~ $ LANG=ru_RU.CP866 LC_ALL=ru_RU.CP866 ./a.out
CP866
```

## Solaris

```
ru
ru.UTF-8
ru.koi8-r
ru_RU
ru_RU.ANSI1251
ru_RU.ISO8859-5
ru_RU.KOI8-R
ru_RU.UTF-8

zaytsev@gcc-solaris10:~/src$ LANG=ru_RU.ISO8859-5 LC_ALL=ru_RU.ISO8859-5 ./a.o>
ISO8859-5

zaytsev@gcc-solaris10:~/src$ LANG=ru.koi8-r LC_ALL=ru.koi8-r ./a.out
KOI8-R
```

## AIX

```
zaytsev@gcc111:[/home/zaytsev]locale -a
C
POSIX
en_US.8859-15
en_US.IBM-858
en_US.ISO8859-1
en_US

-bash-5.1$ LANG=en_US.ISO8859-1 LC_ALL=en_US.ISO8859-1 ./a.out
ISO8859-1
```

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2024-10-05 11:49:26 +02:00
..
mcconfig Merge lib/strescape.h into lib/strutil.h. Rename functions. 2024-04-07 16:38:11 +03:00
search Update copyright years. 2024-01-01 09:46:17 +03:00
strutil Update copyright years. 2024-01-01 09:46:17 +03:00
vfs charset: rename IBM866 to CP866 for iconv and adjust charset names for codeset 2024-10-05 11:49:26 +02:00
widget Indentation using GNU indent-2.2.13. 2024-06-02 12:49:13 +03:00
library_independ.c Update copyright years. 2024-01-01 09:46:17 +03:00
Makefile.am tests: fix incomplete linkage in case of --enable-mclib. 2023-08-13 14:59:25 +03:00
mc_build_filename.c Update copyright years. 2024-01-01 09:46:17 +03:00
mc_realpath.c Clarify handling of "#enc:". 2024-06-02 12:41:34 +03:00
name_quote.c Update copyright years. 2024-01-01 09:46:17 +03:00
serialize.c Update copyright years. 2024-01-01 09:46:17 +03:00
utilunix__mc_pstream_get_string.c Indentation using GNU indent-2.2.13. 2024-06-02 12:49:13 +03:00
utilunix__my_system-common.c Indentation using GNU indent-2.2.13. 2024-06-02 12:49:13 +03:00
utilunix__my_system-fork_child_shell.c Merge lib/utilunix.h into lib/util.h. 2024-04-07 16:38:11 +03:00
utilunix__my_system-fork_child.c Merge lib/utilunix.h into lib/util.h. 2024-04-07 16:38:11 +03:00
utilunix__my_system-fork_fail.c Merge lib/utilunix.h into lib/util.h. 2024-04-07 16:38:11 +03:00
x_basename.c Update copyright years. 2024-01-01 09:46:17 +03:00