Ticket #3992: improve support of Windows 1251 encoding on Solaris.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2019-07-07 16:27:53 +03:00
parent 5c7abf5b3c
commit 76a5f70f5b
5 changed files with 26 additions and 8 deletions

View File

@ -566,6 +566,7 @@ contrib/dist/pkginfo
contrib/dist/prototype
misc/Makefile
misc/mc.charsets
misc/mc.menu
misc/mcedit.menu
misc/skins/Makefile

View File

@ -55,8 +55,14 @@ static const char *const str_utf8_encodings[] = {
/* standard 8bit encodings, no wide or multibytes characters */
static const char *const str_8bit_encodings[] = {
/* Solaris has different names of Windows 1251 encoding */
#ifdef __sun
"ansi-1251",
"ansi1251",
#else
"cp-1251",
"cp1251",
#endif
"cp-1250",
"cp1250",
"cp-866",

View File

@ -22,5 +22,17 @@ AC_DEFUN([mc_I18N],[
AC_DEFINE(HAVE_CHARSET, 1, [Define to enable charset selection and conversion])
have_charset=yes
charset_msg="yes"
dnl Solaris has different name of Windows 1251 encoding
case $host_os in
solaris*)
CP1251="ANSI-1251"
;;
*)
CP1251="CP1251"
;;
esac
AC_SUBST(CP1251)
fi
])

View File

@ -8,17 +8,20 @@ noinst_DATA = xterm.ad
pkgdata_DATA = \
mc.lib
if CHARSET
pkgdata_DATA += mc.charsets
endif
SCRIPTS_IN = \
mc.menu.in \
mcedit.menu.in
if CHARSET
SCRIPTS_IN += mc.charsets.in
endif
SCRIPTS_OUT = \
mc.menu \
mcedit.menu
if CHARSET
SCRIPTS_OUT += mc.charsets
endif
LIBFILES_CONST = \
filehighlight.ini \
@ -47,10 +50,6 @@ EXTRA_DIST = \
$(SCRIPTS_IN) \
$(noinst_DATA) \
$(pkgdata_DATA)
#if CHARSET is defined, mc.charsets is already here
if !CHARSET
EXTRA_DIST += mc.charsets
endif
install-data-hook:
cd $(DESTDIR)$(cfgdir) && rm -f mc.keymap && $(LN_S) mc.default.keymap mc.keymap

View File

@ -3,7 +3,7 @@ ISO-8859-1 ISO 8859-1
ISO-8859-2 ISO 8859-2
ISO-8859-5 ISO 8859-5
CP1250 Windows 1250
CP1251 Windows 1251
@CP1251@ Windows 1251
CP437 CP 437
CP850 CP 850
CP852 CP 852