mc/m4.include
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
..
gnulib Sync with gnulib 80a344e3237b878734295cbe696b7f1e4a8541f0. 2021-06-20 15:14:56 +03:00
vfs Rename FISH VFS to SHELL one. 2023-10-15 16:04:39 +03:00
ax_append_compile_flags.m4 Reimplement compiler options checking. 2021-11-21 15:00:39 +03:00
ax_append_flag.m4 Reimplement compiler options checking. 2021-11-21 15:00:39 +03:00
ax_check_compile_flag.m4 m4: add Werror when checking for compiler flags 2024-06-02 12:49:13 +03:00
ax_check_pcre2.m4 Ticket #4450: support PCRE2 in the search engine. 2023-03-25 10:07:41 +03:00
ax_gcc_func_attribute.m4 buildsys: update ax_gcc_func_attribute to fix fallthrough detection 2024-06-02 12:49:13 +03:00
ax_path_lib_pcre.m4 Ticket #4450: support PCRE2 in the search engine. 2023-03-25 10:07:41 +03:00
ax_require_defined.m4 Reimplement compiler options checking. 2021-11-21 15:00:39 +03:00
dx_doxygen.m4 Misspellings fixes by https://github.com/vlajos/misspell_fixer 2013-06-15 11:10:41 +04:00
mc-assert.m4 Replace [] in AS_HELP_STRING. 2019-09-29 15:11:53 +03:00
mc-background.m4 Replace [] in AS_HELP_STRING. 2019-09-29 15:11:53 +03:00
mc-cflags.m4 m4: add Werror when checking for compiler flags 2024-06-02 12:49:13 +03:00
mc-check-search-type.m4 Ticket #4450: support PCRE2 in the search engine. 2023-03-25 10:07:41 +03:00
mc-ext2fs-attr.m4 Ticket #4439: FTBFS on FreeBSD with ext2fs attribute support: 2023-08-19 20:51:07 +03:00
mc-get-fs-info.m4 gl_POSIX_FALLOCATE: rename to POSIX_FALLOCATE. 2023-03-19 20:34:23 +03:00
mc-glib.m4 Bump minimum GLib requirenment to 2.32.0. 2023-11-06 21:06:14 +03:00
mc-i18n.m4 charset: rename IBM866 to CP866 for iconv and adjust charset names for codeset 2024-10-05 11:49:26 +02:00
mc-subshell.m4 m4.include/mc-subshell.m4: minor refactoring. 2021-06-20 15:14:55 +03:00
mc-tests.m4 Fix various typos in the source code (closes MidnightCommander/mc#177). 2023-01-28 21:38:05 +03:00
mc-use-termcap.m4 buildsys: fix broken detection for termcap libraries when using slang 2024-06-15 10:40:22 +02:00
mc-version.m4 Use configure detected or user specified sed in build system 2023-05-20 19:56:53 +03:00
mc-vfs.m4 Rename FISH VFS to SHELL one. 2023-10-15 16:04:39 +03:00
mc-with-internal-edit.m4 buildsys: make it possible to specify aspell prefix (for macOS) 2024-07-28 18:42:51 +02:00
mc-with-screen-ncurses.m4 Ticket #4465: remove duplicated libs from MCLIBS (again). 2023-05-21 20:15:30 +03:00
mc-with-screen-slang.m4 buildsys: fix broken detection for termcap libraries when using slang 2024-06-15 10:40:22 +02:00
mc-with-screen.m4 Unify m4 macro names. 2016-03-04 09:23:36 +03:00
mc-with-x.m4 Unify m4 macro names. 2016-03-04 09:23:36 +03:00