Merge branch '3992_solaris_cp1251'

* 3992_solaris_cp1251:
  Ticket #3992: improve support of Windows 1251 encoding on Solaris.
This commit is contained in:
Andrew Borodin 2019-07-13 08:58:52 +03:00
commit 2dc676eeea
5 changed files with 26 additions and 8 deletions

View File

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

View File

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

View File

@ -22,5 +22,17 @@ AC_DEFUN([mc_I18N],[
AC_DEFINE(HAVE_CHARSET, 1, [Define to enable charset selection and conversion]) AC_DEFINE(HAVE_CHARSET, 1, [Define to enable charset selection and conversion])
have_charset=yes have_charset=yes
charset_msg="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 fi
]) ])

View File

@ -8,17 +8,20 @@ noinst_DATA = xterm.ad
pkgdata_DATA = \ pkgdata_DATA = \
mc.lib mc.lib
if CHARSET
pkgdata_DATA += mc.charsets
endif
SCRIPTS_IN = \ SCRIPTS_IN = \
mc.menu.in \ mc.menu.in \
mcedit.menu.in mcedit.menu.in
if CHARSET
SCRIPTS_IN += mc.charsets.in
endif
SCRIPTS_OUT = \ SCRIPTS_OUT = \
mc.menu \ mc.menu \
mcedit.menu mcedit.menu
if CHARSET
SCRIPTS_OUT += mc.charsets
endif
LIBFILES_CONST = \ LIBFILES_CONST = \
filehighlight.ini \ filehighlight.ini \
@ -47,10 +50,6 @@ EXTRA_DIST = \
$(SCRIPTS_IN) \ $(SCRIPTS_IN) \
$(noinst_DATA) \ $(noinst_DATA) \
$(pkgdata_DATA) $(pkgdata_DATA)
#if CHARSET is defined, mc.charsets is already here
if !CHARSET
EXTRA_DIST += mc.charsets
endif
install-data-hook: install-data-hook:
cd $(DESTDIR)$(cfgdir) && rm -f mc.keymap && $(LN_S) mc.default.keymap mc.keymap 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-2 ISO 8859-2
ISO-8859-5 ISO 8859-5 ISO-8859-5 ISO 8859-5
CP1250 Windows 1250 CP1250 Windows 1250
CP1251 Windows 1251 @CP1251@ Windows 1251
CP437 CP 437 CP437 CP 437
CP850 CP 850 CP850 CP 850
CP852 CP 852 CP852 CP 852