changeset 33788:5ea4c560f01c

runtime(doc): Refactor doc-Makefiles (#13519) Commit: https://github.com/vim/vim/commit/ab4f27e2a8ae72970e24b83a6828ed4d2c6f112f Author: Restorer <69863286+RestorerZ@users.noreply.github.com> Date: Sat Nov 18 16:12:20 2023 +0000 runtime(doc): Refactor doc-Makefiles (https://github.com/vim/vim/issues/13519) Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sat, 18 Nov 2023 17:15:05 +0100
parents 2d930bef4c22
children 2175a980f3eb
files runtime/lang/Make_all.mak runtime/lang/Make_mvc.mak runtime/lang/Makefile
diffstat 3 files changed, 637 insertions(+), 82 deletions(-) [+]
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/runtime/lang/Make_all.mak
@@ -0,0 +1,30 @@
+#
+# Makefile with common components
+#
+
+CONVERTED = \
+		menu_chinese_gb.936.vim \
+		menu_chinese_taiwan.950.vim \
+		menu_cs_cz.iso_8859-2.vim \
+		menu_czech_czech_republic.1250.vim \
+		menu_czech_czech_republic.ascii.vim \
+		menu_hu_hu.iso_8859-2.vim \
+		menu_ja_jp.euc-jp.vim \
+		menu_japanese_japan.932.vim \
+		menu_ko_kr.euckr.vim \
+		menu_pl_pl.iso_8859-2.vim \
+		menu_polish_poland.1250.vim \
+		menu_ru_ru.cp1251.vim \
+		menu_ru_ru.koi8-r.vim \
+		menu_sk_sk.iso_8859-2.vim \
+		menu_sl_si.cp1250.vim \
+		menu_sl_si.latin2.vim \
+		menu_sr_rs.ascii.vim \
+		menu_sr_rs.iso_8859-2.vim \
+		menu_sr_rs.iso_8859-5.vim \
+		menu_tr_tr.cp1254.vim \
+		menu_tr_tr.iso_8859-9.vim \
+		menu_uk_ua.cp1251.vim \
+		menu_uk_ua.koi8-u.vim \
+
+# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make:
new file mode 100644
--- /dev/null
+++ b/runtime/lang/Make_mvc.mak
@@ -0,0 +1,516 @@
+#
+# Makefile for converted the Vim menu files on Windows
+#
+# 08.11.23, Restorer, <restorer@mail2k.ru>
+
+!IF [powershell -nologo -noprofile "exit $$psversiontable.psversion.major"] == 2
+!ERROR The program "PowerShell" version 3.0 or higher is required to work
+!ENDIF
+
+# Common components
+!INCLUDE Make_all.mak
+
+# Correct the following line for the directory where iconv is installed
+ICONV_PATH = D:\Programs\GetText\bin
+
+# In case some package like GnuWin32, UnixUtils, gettext
+# or something similar is installed on the system.
+# If the "iconv" program is installed on the system, but it is not registered
+# in the %PATH% environment variable, then specify the full path to this file.
+!IF EXIST ("iconv.exe")
+ICONV = iconv.exe
+!ELSEIF EXIST ("$(ICONV_PATH)\iconv.exe")
+ICONV="$(ICONV_PATH)\iconv.exe"
+!ENDIF
+
+RM = del /q
+
+
+all : $(CONVERTED)
+
+# Convert menu_zh_cn.utf-8.vim to create menu_chinese_gb.936.vim.
+menu_chinese_gb.936.vim : menu_zh_cn.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t CP936 $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(936))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(936)) -replace \
+		'scriptencoding utf-8', 'scriptencoding cp936' -replace \
+		' Original translations', ' Generated from menu_zh_cn.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(936))
+
+# Convert menu_zh_tw.utf-8.vim to create menu_chinese_taiwan.950.vim.
+menu_chinese_taiwan.950.vim : menu_zh_tw.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t CP950 $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(950))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(950)) -replace \
+		'scriptencoding utf-8', 'scriptencoding cp950' -replace \
+		' Original translations', ' Generated from menu_zh_tw.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(950))
+
+# Convert menu_cs_cz.utf-8.vim to create menu_cs_cz.iso_8859-2.vim.
+menu_cs_cz.iso_8859-2.vim : menu_cs_cz.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(28592))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(28592)) -replace \
+		' Czech \(UTF-8\)', ' Czech (ISO-8859-2)' -replace \
+		\"scriptencoding utf-8\", \"scriptencoding iso-8859-2\" -replace \
+		\" Original translations\", \" Generated from menu_cs_cz.utf-8.vim, DO NOT EDIT\"; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(28592))
+
+# Convert menu_cs_cz.utf-8.vim to create menu_czech_czech_republic.1250.vim.
+menu_czech_czech_republic.1250.vim : menu_cs_cz.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t CP1250 $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(1250))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(1250)) -replace \
+		' Czech \(UTF-8\)', ' Czech (CP1250)' -replace \
+		\"scriptencoding utf-8\", \"scriptencoding cp1250\" -replace \
+		\" Original translations\", \" Generated from menu_cs_cz.utf-8.vim, DO NOT EDIT\"; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(1250))
+
+# Convert menu_cs_cz.utf-8.vim to create menu_czech_czech_republic.ascii.vim.
+menu_czech_czech_republic.ascii.vim : menu_cs_cz.utf-8.vim
+	$(RM) $@
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)) -replace \
+		'scriptencoding utf-8', 'scriptencoding latin1' -replace \
+		' Original translations', ' Generated from menu_cs_cz.utf-8.vim, DO NOT EDIT' -replace \
+		'Czech \(UTF-8\)', 'Czech (ASCII - without diacritics)' -creplace \
+		[char]193, 'A' -creplace [char]225, 'a' -creplace [char]268, 'C' -creplace \
+		[char]269, 'c' -creplace [char]270, 'D' -creplace [char]271, 'd' -creplace \
+		[char]201, 'E' -creplace [char]233, 'e' -creplace [char]282, 'E' -creplace \
+		[char]283, 'e' -creplace [char]205, 'I' -creplace [char]237, 'i' -creplace \
+		[char]327, 'N' -creplace [char]328, 'n' -creplace [char]211, 'O' -creplace \
+		[char]243, 'o' -creplace [char]344, 'R' -creplace [char]345, 'r' -creplace \
+		[char]352, 'S' -creplace [char]353, 's' -creplace [char]356, 'T' -creplace \
+		[char]357, 't' -creplace [char]218, 'U' -creplace [char]250, 'u' -creplace \
+		[char]366, 'U' -creplace [char]367, 'u' -creplace [char]221, 'Y' -creplace \
+		[char]253, 'y' -creplace [char]381, 'Z' -creplace [char]382, 'z' ^| \
+		1>nul New-Item -Force -Path . -ItemType file -Name $@
+
+# Convert menu_hu_hu.utf-8.vim to create menu_hu_hu.iso_8859-2.vim.
+menu_hu_hu.iso_8859-2.vim : menu_hu_hu.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(28592))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(28592)) -replace \
+		'scriptencoding utf-8', 'scriptencoding iso-8859-2' -replace \
+		' Original translations', ' Generated from menu_hu_hu.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(28592))
+
+# Convert menu_ja_jp.utf-8.vim to create menu_ja_jp.euc-jp.vim.
+menu_ja_jp.euc-jp.vim : menu_ja_jp.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t EUC-JP $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(51932))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(51932)) -replace \
+		'Japanese \(UTF-8\)', 'Japanese (EUC-JP)' -replace \
+		'scriptencoding utf-8', 'scriptencoding euc-jp' -replace \
+		' Original translations', ' Generated from menu_ja_jp.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(51932))
+
+# Convert menu_ja_jp.utf-8.vim to create menu_japanese_japan.932.vim.
+menu_japanese_japan.932.vim : menu_ja_jp.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t CP932 $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(932))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(932)) -replace \
+		'Japanese \(UTF-8\)', 'Japanese (CP932)' -replace \
+		'scriptencoding utf-8', 'scriptencoding cp932' -replace \
+		' Original translations', ' Generated from menu_ja_jp.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(932))
+
+# Convert menu_ko_kr.utf-8.vim to create menu_ko_kr.euckr.vim.
+menu_ko_kr.euckr.vim : menu_ko_kr.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t EUC-KR $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(51949))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(51949)) -replace \
+		'scriptencoding utf-8', 'scriptencoding euc-kr' -replace \
+		' Original translations', ' Generated from menu_ko_kr.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(51949))
+
+# Convert menu_pl_pl.utf-8.vim to create menu_pl_pl.iso_8859-2.vim.
+menu_pl_pl.iso_8859-2.vim : menu_pl_pl.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(28592))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(28592)) -replace \
+		'scriptencoding utf-8', 'scriptencoding iso-8859-2' -replace \
+		' Original translations', ' Generated from menu_pl_pl.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(28592))
+
+# Convert menu_pl_pl.utf-8.vim to create menu_polish_poland.1250.vim.
+menu_polish_poland.1250.vim : menu_pl_pl.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t CP1250 $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(1250))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(1250)) -replace \
+		'scriptencoding utf-8', 'scriptencoding cp1250' -replace \
+		' Original translations', ' Generated from menu_pl_pl.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(1250))
+
+# Convert menu_ru_ru.utf-8.vim to create menu_ru_ru.cp1251.vim.
+menu_ru_ru.cp1251.vim : menu_ru_ru.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t CP1251 $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(1251))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(1251)) -replace \
+		'scriptencoding utf-8', 'scriptencoding cp1251' -replace \
+		' Original translations', ' Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(1251))
+
+# Convert menu_ru_ru.utf-8.vim to create menu_ru_ru.koi8-r.vim.
+menu_ru_ru.koi8-r.vim : menu_ru_ru.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t KOI8-R $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(20866))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(20866)) -replace \
+		'scriptencoding utf-8', 'scriptencoding koi8-r' -replace \
+		' Original translations', ' Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(20866))
+
+# Convert menu_slovak_slovak_republic.1250.vim to create menu_sk_sk.iso_8859-2.vim.
+menu_sk_sk.iso_8859-2.vim : menu_slovak_slovak_republic.1250.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f CP1250 -t ISO-8859-2 $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(1250)), \
+		[System.Text.Encoding]::GetEncoding(28592))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(28592)) -replace \
+		'scriptencoding cp1250', 'scriptencoding iso-8859-2' -replace \
+		' Original translations', ' Generated from menu_slovak_slovak_republic.1250.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(28592))
+
+# Convert menu_sl_si.utf-8.vim to create menu_sl_si.cp1250.vim.
+menu_sl_si.cp1250.vim : menu_sl_si.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t CP1250 $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(1250))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(1250)) -replace \
+		'scriptencoding utf-8', 'scriptencoding cp1250' -replace \
+		' Original translations', ' Generated from menu_sl_si.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(1250))
+
+# Convert menu_sl_si.utf-8.vim to create menu_sl_si.latin2.vim.
+menu_sl_si.latin2.vim : menu_sl_si.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(28592))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(28592)) -replace \
+		'scriptencoding utf-8', 'scriptencoding iso-8859-2' -replace \
+		' Original translations', ' Generated from menu_sl_si.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(28592))
+
+# Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.ascii.vim.
+menu_sr_rs.ascii.vim : menu_sr_rs.utf-8.vim
+	$(RM) $@
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)) -replace \
+		'scriptencoding utf-8', 'scriptencoding latin1' -replace \
+		' Original translations', ' Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT' -creplace \
+		[char]1072, 'a' -creplace [char]1073, 'b' -creplace [char]1074, 'v' -creplace \
+		[char]1075, 'g' -creplace [char]1076, 'd' -creplace [char]1106, 'dj' -creplace \
+		[char]1077, 'e' -creplace [char]1078, 'z' -creplace [char]1079, 'z' -creplace \
+		[char]1080, 'i' -creplace [char]1112, 'j' -creplace [char]1082, 'k' -creplace \
+		[char]1083, 'l' -creplace [char]1113, 'lj' -creplace [char]1084, 'm' -creplace \
+		[char]1085, 'n' -creplace [char]1114, 'nj' -creplace [char]1086, 'o' -creplace \
+		[char]1087, 'p' -creplace [char]1088, 'r' -creplace [char]1089, 's' -creplace \
+		[char]1090, 't' -creplace [char]1115, 'c' -creplace [char]1091, 'u' -creplace \
+		[char]1092, 'f' -creplace [char]1093, 'h' -creplace [char]1094, 'c' -creplace \
+		[char]1095, 'c' -creplace [char]1119, 'dz' -creplace [char]1096, 's' -creplace \
+		[char]1040, 'A' -creplace [char]1041, 'B' -creplace [char]1042, 'V' -creplace \
+		[char]1043, 'G' -creplace [char]1044, 'D' -creplace [char]1026, 'Đ' -creplace \
+		[char]1045, 'E' -creplace [char]1046, 'Z' -creplace [char]1047, 'Z' -creplace \
+		[char]1048, 'I' -creplace [char]1032, 'J' -creplace [char]1050, 'K' -creplace \
+		[char]1051, 'L' -creplace [char]1033, 'Lj' -creplace [char]1052, 'M' -creplace \
+		[char]1053, 'N' -creplace [char]1034, 'Nj' -creplace [char]1054, 'O' -creplace \
+		[char]1055, 'P' -creplace [char]1056, 'R' -creplace [char]1057, 'S' -creplace \
+		[char]1058, 'T' -creplace [char]1035, 'C' -creplace [char]1059, 'U' -creplace \
+		[char]1060, 'F' -creplace [char]1061, 'H' -creplace [char]1062, 'C' -creplace \
+		[char]1063, 'C' -creplace [char]1039, 'Dz' -creplace [char]1064, 'S' ^| \
+		1>nul New-Item -Force -Path . -ItemType file -Name $@
+
+# Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.iso_8859-2.vim.
+menu_sr_rs.iso_8859-2.vim : menu_sr_rs.utf-8.vim
+	$(RM) $@
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)) -creplace \
+		[char]1072, 'a' -creplace [char]1073, 'b' -creplace [char]1074, 'v' -creplace \
+		[char]1075, 'g' -creplace [char]1076, 'd' -creplace [char]1106, [char]273 -creplace \
+		[char]1077, 'e' -creplace [char]1078, [char]382 -creplace [char]1079, 'z' -creplace \
+		[char]1080, 'i' -creplace [char]1112, 'j' -creplace [char]1082, 'k' -creplace \
+		[char]1083, 'l' -creplace [char]1113, 'lj' -creplace [char]1084, 'm' -creplace \
+		[char]1085, 'n' -creplace [char]1114, 'nj' -creplace [char]1086, 'o' -creplace \
+		[char]1087, 'p' -creplace [char]1088, 'r' -creplace [char]1089, 's' -creplace \
+		[char]1090, 't' -creplace [char]1115, [char]263 -creplace [char]1091, 'u' -creplace \
+		[char]1092, 'f' -creplace [char]1093, 'h' -creplace [char]1094, 'c' -creplace \
+		[char]1095, [char]269 -creplace [char]1119, 'dz' -creplace [char]1096, [char]353 -creplace \
+		[char]1040, 'A' -creplace [char]1041, 'B' -creplace [char]1042, 'V' -creplace \
+		[char]1043, 'G' -creplace [char]1044, 'D' -creplace [char]1026, 'Đ' -creplace \
+		[char]1045, 'E' -creplace [char]1046, [char]381 -creplace [char]1047, 'Z' -creplace \
+		[char]1048, 'I' -creplace [char]1032, 'J' -creplace [char]1050, 'K' -creplace \
+		[char]1051, 'L' -creplace [char]1033, 'Lj'-creplace [char]1052, 'M' -creplace \
+		[char]1053, 'N' -creplace [char]1034, 'Nj' -creplace [char]1054, 'O' -creplace \
+		[char]1055, 'P' -creplace [char]1056, 'R' -creplace [char]1057, 'S' -creplace \
+		[char]1058, 'T' -creplace [char]1035, [char]262 -creplace [char]1059, 'U' -creplace \
+		[char]1060, 'F' -creplace [char]1061, 'H' -creplace [char]1062, 'C' -creplace \
+		[char]1063, [char]268 -creplace [char]1039, 'Dz' -creplace [char]1064, [char]352 -replace \
+		'scriptencoding utf-8', 'scriptencoding iso-8859-2' -replace \
+		' Original translations', ' Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, [System.Text.Encoding]::GetEncoding(28592))
+
+# Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.iso_8859-5.vim.
+menu_sr_rs.iso_8859-5.vim : menu_sr_rs.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t ISO-8859-5 $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(28595))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(28595)) -replace \
+		'scriptencoding utf-8', 'scriptencoding iso-8859-5' -replace \
+		' Original translations', ' Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(28595))
+
+# Convert menu_tr_tr.utf-8.vim to create menu_tr_tr.cp1254.vim.
+menu_tr_tr.cp1254.vim : menu_tr_tr.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t CP1254 $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(1254))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(1254)) -replace \
+		'scriptencoding utf-8', 'scriptencoding cp1254' -replace \
+		' Original translations', ' Generated from menu_tr_tr.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(1254))
+
+# Convert menu_tr_tr.utf-8.vim to create menu_tr_tr.iso_8859-9.vim.
+menu_tr_tr.iso_8859-9.vim : menu_tr_tr.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t ISO-8859-9 $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(28599))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(28599)) -replace \
+		'scriptencoding utf-8', 'scriptencoding iso-8859-9' -replace \
+		' Original translations', ' Generated from menu_tr_tr.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(28599))
+
+# Convert menu_uk_ua.utf-8.vim to create menu_uk_ua.cp1251.vim.
+menu_uk_ua.cp1251.vim : menu_uk_ua.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t CP1251 $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(1251))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(1251)) -replace \
+		'scriptencoding utf-8', 'scriptencoding cp1251' -replace \
+		' Original translations', ' Generated from menu_uk_ua.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(1251))
+
+# Convert menu_uk_ua.utf-8.vim to create menu_uk_ua.koi8-u.vim.
+menu_uk_ua.koi8-u.vim : menu_uk_ua.utf-8.vim
+	$(RM) $@
+!IF DEFINED (ICONV)
+	$(ICONV) -f UTF-8 -t KOI8-U $? >$@
+!ELSE
+	powershell -nologo -noprofile -Command \
+		[System.IO.File]::WriteAllText(\"$@\", \
+		[System.IO.File]::ReadAllText(\"$?\", \
+		[System.Text.Encoding]::GetEncoding(65001)), \
+		[System.Text.Encoding]::GetEncoding(21866))
+!ENDIF
+	powershell -nologo -noprofile -Command \
+		$$out = [System.IO.File]::ReadAllText(\"$@\", \
+		[System.Text.Encoding]::GetEncoding(21866)) -replace \
+		'scriptencoding utf-8', 'scriptencoding koi8-u' -replace \
+		' Original translations', ' Generated from menu_uk_ua.utf-8.vim, DO NOT EDIT'; \
+		[System.IO.File]::WriteAllText(\"$@\", $$out, \
+		[System.Text.Encoding]::GetEncoding(21866))
+
+# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make:
--- a/runtime/lang/Makefile
+++ b/runtime/lang/Makefile
@@ -1,49 +1,33 @@
 # Author: Ada (Haowen) Yu <me@yuhaowen.com>
 
-all: \
-		menu_chinese_gb.936.vim \
-		menu_uk_ua.cp1251.vim \
-		menu_uk_ua.koi8-u.vim \
-		menu_chinese_taiwan.950.vim \
-		menu_cs_cz.iso_8859-2.vim \
-		menu_czech_czech_republic.1250.vim \
-		menu_ja_jp.euc-jp.vim \
-		menu_japanese_japan.932.vim \
-		menu_ko_kr.euckr.vim \
-		menu_pl_pl.iso_8859-2.vim \
-		menu_polish_poland.1250.vim \
-		menu_ru_ru.koi8-r.vim \
-		menu_ru_ru.cp1251.vim \
-		menu_sl_si.cp1250.vim \
-		menu_sl_si.latin2.vim \
-		menu_slovak_slovak_republic.1250.vim \
-		menu_tr_tr.cp1254.vim \
-		menu_tr_tr.iso_8859-9.vim \
-		menu_sr_rs.iso_8859-5.vim \
-		menu_sr_rs.iso_8859-2.vim \
-		menu_sr_rs.ascii.vim \
-		menu_czech_czech_republic.ascii.vim \
-		menu_hu_hu.iso_8859-2.vim \
-		menu_sk_sk.iso_8859-2.vim \
+# Common components
+include Make_all.mak
 
 SED = LANG=C sed
 
+all: $(CONVERTED)
+
+
 # Convert menu_zh_cn.utf-8.vim to create menu_chinese_gb.936.vim.
 menu_chinese_gb.936.vim: menu_zh_cn.utf-8.vim
 	rm -f menu_chinese_gb.936.vim
-	iconv -f utf-8 -t cp936 menu_zh_cn.utf-8.vim | \
-		$(SED) -e 's/scriptencoding utf-8/scriptencoding cp936/' -e 's/" Original translations/" Generated from menu_zh_cn.utf-8.vim, DO NOT EDIT/' > menu_chinese_gb.936.vim
+	iconv -f UTF-8 -t CP936 menu_zh_cn.utf-8.vim | \
+		$(SED) -e 's/scriptencoding utf-8/scriptencoding cp936/' \
+			-e 's/" Original translations/" Generated from menu_zh_cn.utf-8.vim, DO NOT EDIT/' \
+			> menu_chinese_gb.936.vim
 
 # Convert menu_zh_tw.utf-8.vim to create menu_chinese_taiwan.950.vim.
 menu_chinese_taiwan.950.vim: menu_zh_tw.utf-8.vim
 	rm -f menu_chinese_taiwan.950.vim
-	iconv -f utf-8 -t cp950 menu_zh_tw.utf-8.vim | \
-		$(SED) -e 's/scriptencoding utf-8/scriptencoding cp950/' -e 's/" Original translations/" Generated from menu_zh_tw.utf-8.vim, DO NOT EDIT/' > menu_chinese_taiwan.950.vim
+	iconv -f UTF-8 -t CP950 menu_zh_tw.utf-8.vim | \
+		$(SED) -e 's/scriptencoding utf-8/scriptencoding cp950/' \
+			-e 's/" Original translations/" Generated from menu_zh_tw.utf-8.vim, DO NOT EDIT/' \
+			> menu_chinese_taiwan.950.vim
 
 # Convert menu_cs_cz.utf-8.vim to create menu_cs_cz.iso_8859-2.vim.
 menu_cs_cz.iso_8859-2.vim: menu_cs_cz.utf-8.vim
 	rm -f menu_cs_cz.iso_8859-2.vim
-	iconv -f utf-8 -t iso8859-2 menu_cs_cz.utf-8.vim | \
+	iconv -f UTF-8 -t ISO-8859-2 menu_cs_cz.utf-8.vim | \
 		$(SED) -e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' \
 			-e 's/" Original translations/" Generated from menu_cs_cz.utf-8.vim, DO NOT EDIT/' \
 			-e 's/\(" Menu Translations:.*\)(.*)/\1(ISO8859-2)/'  \
@@ -52,11 +36,11 @@ menu_cs_cz.iso_8859-2.vim: menu_cs_cz.ut
 # Convert menu_cs_cz.utf-8.vim to create menu_czech_czech_republic.1250.vim.
 menu_czech_czech_republic.1250.vim: menu_cs_cz.utf-8.vim
 	rm -f menu_czech_czech_republic.1250.vim
-	iconv -f utf-8 -t cp1250 menu_cs_cz.utf-8.vim | \
+	iconv -f UTF-8 -t CP1250 menu_cs_cz.utf-8.vim | \
 		$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1250/'  \
-		-e 's/" Original translations/" Generated from menu_cs_cz.utf-8.vim, DO NOT EDIT/'  \
-		-e 's/\(" Menu Translations:.*\)(.*)/\1(CP1250)/'  \
-		> menu_czech_czech_republic.1250.vim
+			-e 's/" Original translations/" Generated from menu_cs_cz.utf-8.vim, DO NOT EDIT/'  \
+			-e 's/\(" Menu Translations:.*\)(.*)/\1(CP1250)/'  \
+			> menu_czech_czech_republic.1250.vim
 
 # Convert menu_cs_cz.utf-8.vim to create menu_czech_czech_republic.ascii.vim.
 menu_czech_czech_republic.ascii.vim: menu_cs_cz.utf-8.vim
@@ -70,93 +54,108 @@ menu_czech_czech_republic.ascii.vim: men
 		-e 's/scriptencoding utf-8/scriptencoding latin1/'  \
 		-e 's/" Original translations/" Generated from menu_cs_cz.utf-8.vim, DO NOT EDIT/' \
 		-e 's/\(" Menu Translations:.*\)(.*)/\1(ASCII - without diacritics)/'  \
-	menu_cs_cz.utf-8.vim > menu_czech_czech_republic.ascii.vim
+		menu_cs_cz.utf-8.vim > menu_czech_czech_republic.ascii.vim
 
 # Convert menu_ja_jp.utf-8.vim to create menu_ja_jp.euc-jp.vim.
 menu_ja_jp.euc-jp.vim: menu_ja_jp.utf-8.vim
 	rm -f menu_ja_jp.euc-jp.vim
-	iconv -f utf-8 -t euc-jp menu_ja_jp.utf-8.vim | \
+	iconv -f UTF-8 -t EUC-JP menu_ja_jp.utf-8.vim | \
 		$(SED) -e 's/scriptencoding utf-8/scriptencoding euc-jp/'  \
-		-e 's/" Original translations/" Generated from menu_ja_jp.utf-8.vim, DO NOT EDIT/'  \
-		-e 's/\(" Menu Translations:.*\)(.*)/\1(EUC-JP)/'  \
-		> menu_ja_jp.euc-jp.vim
+			-e 's/" Original translations/" Generated from menu_ja_jp.utf-8.vim, DO NOT EDIT/'  \
+			-e 's/\(" Menu Translations:.*\)(.*)/\1(EUC-JP)/'  \
+			> menu_ja_jp.euc-jp.vim
 
 # Convert menu_ja_jp.utf-8.vim to create menu_japanese_japan.932.vim.
 menu_japanese_japan.932.vim: menu_ja_jp.utf-8.vim
 	rm -f menu_japanese_japan.932.vim
-	iconv -f utf-8 -t cp932 menu_ja_jp.utf-8.vim | \
+	iconv -f UTF-8 -t CP932 menu_ja_jp.utf-8.vim | \
 		$(SED) -e 's/scriptencoding utf-8/scriptencoding cp932/'  \
-		-e 's/" Original translations/" Generated from menu_ja_jp.utf-8.vim, DO NOT EDIT/' \
-		-e 's/\(" Menu Translations:.*\)(.*)/\1(CP932)/'  \
-		> menu_japanese_japan.932.vim
+			-e 's/" Original translations/" Generated from menu_ja_jp.utf-8.vim, DO NOT EDIT/' \
+			-e 's/\(" Menu Translations:.*\)(.*)/\1(CP932)/'  \
+			> menu_japanese_japan.932.vim
 
 # Convert menu_ko_kr.utf-8.vim to create menu_ko_kr.euckr.vim.
 menu_ko_kr.euckr.vim: menu_ko_kr.utf-8.vim
 	rm -f menu_ko_kr.euckr.vim
-	iconv -f utf-8 -t euc-kr menu_ko_kr.utf-8.vim | \
-		$(SED) -e 's/scriptencoding utf-8/scriptencoding euc-kr/' -e 's/" Original translations/" Generated from menu_ko_kr.utf-8.vim, DO NOT EDIT/' > menu_ko_kr.euckr.vim
+	iconv -f UTF-8 -t EUC-KR menu_ko_kr.utf-8.vim | \
+		$(SED) -e 's/scriptencoding utf-8/scriptencoding euc-kr/' \
+			-e 's/" Original translations/" Generated from menu_ko_kr.utf-8.vim, DO NOT EDIT/' \
+			> menu_ko_kr.euckr.vim
 
 # Convert menu_pl_pl.utf-8.vim to create menu_pl_pl.iso_8859-2.vim.
 menu_pl_pl.iso_8859-2.vim: menu_pl_pl.utf-8.vim
 	rm -f menu_pl_pl.iso_8859-2.vim
-	iconv -f utf-8 -t iso8859-2 menu_pl_pl.utf-8.vim | \
-		$(SED) -e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' -e 's/" Original translations/" Generated from menu_pl_pl.utf-8.vim, DO NOT EDIT/' > menu_pl_pl.iso_8859-2.vim
+	iconv -f UTF-8 -t ISO-8859-2 menu_pl_pl.utf-8.vim | \
+		$(SED) -e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' \
+			-e 's/" Original translations/" Generated from menu_pl_pl.utf-8.vim, DO NOT EDIT/' \
+			> menu_pl_pl.iso_8859-2.vim
 
 # Convert menu_pl_pl.utf-8.vim to create menu_polish_poland.1250.vim.
 menu_polish_poland.1250.vim: menu_pl_pl.utf-8.vim
 	rm -f menu_polish_poland.1250.vim
-	iconv -f utf-8 -t cp1250 menu_pl_pl.utf-8.vim | \
-		$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1250/' -e 's/" Original translations/" Generated from menu_pl_pl.utf-8.vim, DO NOT EDIT/' > menu_polish_poland.1250.vim
+	iconv -f UTF-8 -t CP1250 menu_pl_pl.utf-8.vim | \
+		$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1250/' \
+			-e 's/" Original translations/" Generated from menu_pl_pl.utf-8.vim, DO NOT EDIT/' \
+			> menu_polish_poland.1250.vim
 
 # Convert menu_ru_ru.utf-8.vim to create menu_ru_ru.koi8-r.vim.
 menu_ru_ru.koi8-r.vim: menu_ru_ru.utf-8.vim
 	rm -f menu_ru_ru.koi8-r.vim
-	iconv -f utf-8 -t koi8-r menu_ru_ru.utf-8.vim | \
-		$(SED) -e 's/scriptencoding utf-8/scriptencoding koi8-r/' -e 's/" Original translations/" Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT/' > menu_ru_ru.koi8-r.vim
+	iconv -f UTF-8 -t KOI8-R menu_ru_ru.utf-8.vim | \
+		$(SED) -e 's/scriptencoding utf-8/scriptencoding koi8-r/' \
+			-e 's/" Original translations/" Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT/' \
+			> menu_ru_ru.koi8-r.vim
 
 # Convert menu_ru_ru.utf-8.vim to create menu_ru_ru.cp1251.vim.
 menu_ru_ru.cp1251.vim: menu_ru_ru.utf-8.vim
 	rm -f menu_ru_ru.cp1251.vim
-	iconv -f utf-8 -t cp1251 menu_ru_ru.utf-8.vim | \
-		$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1251/' -e 's/" Original translations/" Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT/' > menu_ru_ru.cp1251.vim
+	iconv -f UTF-8 -t CP1251 menu_ru_ru.utf-8.vim | \
+		$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1251/' \
+			-e 's/" Original translations/" Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT/' \
+			> menu_ru_ru.cp1251.vim
 
 # Convert menu_sl_si.utf-8.vim to create menu_sl_si.cp1250.vim.
 menu_sl_si.cp1250.vim: menu_sl_si.utf-8.vim
 	rm -f menu_sl_si.cp1250.vim
-	iconv -f utf-8 -t cp1250 menu_sl_si.utf-8.vim | \
+	iconv -f UTF-8 -t CP1250 menu_sl_si.utf-8.vim | \
 		$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1250/'  \
-		-e 's/" Original translations/" Generated from menu_sl_si.utf-8.vim, DO NOT EDIT/' > menu_sl_si.cp1250.vim
+			-e 's/" Original translations/" Generated from menu_sl_si.utf-8.vim, DO NOT EDIT/' \
+			> menu_sl_si.cp1250.vim
 
-# Convert menu_uk_ua.utf-8.vim to create menu_sl_si.latin2.vim.
+# for naming encodings, see `:h encoding-names`
+# Convert menu_sl_si.utf-8.vim to create menu_sl_si.latin2.vim.
 menu_sl_si.latin2.vim: menu_sl_si.utf-8.vim
 	rm -f menu_sl_si.latin2.vim
-	iconv -f utf-8 -t latin2 menu_sl_si.utf-8.vim | \
-		$(SED) -e 's/scriptencoding utf-8/scriptencoding latin2/' -e 's/" Original translations/" Generated from menu_sl_si.utf-8.vim, DO NOT EDIT/' > menu_sl_si.latin2.vim
-
-# Convert menu_uk_ua.utf-8.vim to create menu_slovak_slovak_republic.1250.vim.
-menu_slovak_slovak_republic.1250.vim: menu_sl_si.utf-8.vim
-	rm -f menu_slovak_slovak_republic.1250.vim
-	iconv -f utf-8 -t cp1250 menu_sl_si.utf-8.vim | \
-		$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1250/' -e 's/" Original translations/" Generated from menu_sl_si.utf-8.vim, DO NOT EDIT/' > menu_slovak_slovak_republic.1250.vim
+	iconv -f UTF-8 -t ISO-8859-2 menu_sl_si.utf-8.vim | \
+		$(SED) -e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' \
+			-e 's/" Original translations/" Generated from menu_sl_si.utf-8.vim, DO NOT EDIT/' \
+			> menu_sl_si.latin2.vim
 
 # Convert menu_tr_tr.utf-8.vim to create menu_tr_tr.cp1254.vim.
 menu_tr_tr.cp1254.vim: menu_tr_tr.utf-8.vim
 	rm -f menu_tr_tr.cp1254.vim
-	iconv -f utf-8 -t cp1254 menu_tr_tr.utf-8.vim | \
-		$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1254/' -e 's/" Original translations/" Generated from menu_tr_tr.utf-8.vim, DO NOT EDIT/' > menu_tr_tr.cp1254.vim
+	iconv -f UTF-8 -t CP1254 menu_tr_tr.utf-8.vim | \
+		$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1254/' \
+			-e 's/" Original translations/" Generated from menu_tr_tr.utf-8.vim, DO NOT EDIT/' \
+			> menu_tr_tr.cp1254.vim
 
 # Convert menu_tr_tr.utf-8.vim to create menu_tr_tr.iso_8859-9.vim.
 menu_tr_tr.iso_8859-9.vim: menu_tr_tr.utf-8.vim
 	rm -f menu_tr_tr.iso_8859-9.vim
-	iconv -f utf-8 -t iso8859-9 menu_tr_tr.utf-8.vim | \
-		$(SED) -e 's/scriptencoding utf-8/scriptencoding iso8859-9/' -e 's/" Original translations/" Generated from menu_tr_tr.utf-8.vim, DO NOT EDIT/' > menu_tr_tr.iso_8859-9.vim
+	iconv -f UTF-8 -t ISO-8859-9 menu_tr_tr.utf-8.vim | \
+		$(SED) -e 's/scriptencoding utf-8/scriptencoding iso-8859-9/' \
+			-e 's/" Original translations/" Generated from menu_tr_tr.utf-8.vim, DO NOT EDIT/' \
+			> menu_tr_tr.iso_8859-9.vim
 
 # Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.iso_8859-5.vim.
 menu_sr_rs.iso_8859-5.vim: menu_sr_rs.utf-8.vim
 	rm -f menu_sr_rs.iso_8859-5.vim
-	iconv -f utf-8 -t iso8859-5 menu_sr_rs.utf-8.vim | \
-		$(SED) -e 's/scriptencoding utf-8/scriptencoding iso8859-5/' -e 's/" Original translations/" Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT/' > menu_sr_rs.iso_8859-5.vim
+	iconv -f UTF-8 -t ISO-8859-5 menu_sr_rs.utf-8.vim | \
+		$(SED) -e 's/scriptencoding utf-8/scriptencoding iso-8859-5/' \
+			-e 's/" Original translations/" Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT/' \
+			> menu_sr_rs.iso_8859-5.vim
 
+# for naming encodings, see `:h encoding-names`
 # Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.iso_8859-2.vim.
 menu_sr_rs.iso_8859-2.vim: menu_sr_rs.utf-8.vim
 	rm -f menu_sr_rs.iso_8859-2.vim
@@ -172,9 +171,10 @@ menu_sr_rs.iso_8859-2.vim: menu_sr_rs.ut
 		-e 's/Н/N/g' -e 's/Њ/Nj/g' -e 's/О/O/g' -e 's/П/P/g' -e 's/Р/R/g' \
 		-e 's/С/S/g' -e 's/Т/T/g' -e 's/Ћ/Ć/g' -e 's/У/U/g' -e 's/Ф/F/g' \
 		-e 's/Х/H/g' -e 's/Ц/C/g' -e 's/Ч/Č/g' -e 's/Џ/Dž/g' -e 's/Ш/Š/g' \
-		-e 's/scriptencoding utf-8/scriptencoding iso8859-2/' -e 's/" Original translations/" Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT/' \
-		menu_sr_rs.utf-8.vim | iconv -f utf-8 -t iso8859-2 \
-	> menu_sr_rs.iso_8859-2.vim
+		-e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' \
+		-e 's/" Original translations/" Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT/' \
+		menu_sr_rs.utf-8.vim | iconv -f UTF-8 -t ISO-8859-2 \
+		> menu_sr_rs.iso_8859-2.vim
 
 # Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.ascii.vim.
 menu_sr_rs.ascii.vim: menu_sr_rs.utf-8.vim
@@ -191,29 +191,38 @@ menu_sr_rs.ascii.vim: menu_sr_rs.utf-8.v
 		-e 's/Н/N/g' -e 's/Њ/Nj/g' -e 's/О/O/g' -e 's/П/P/g' -e 's/Р/R/g' \
 		-e 's/С/S/g' -e 's/Т/T/g' -e 's/Ћ/C/g' -e 's/У/U/g' -e 's/Ф/F/g' \
 		-e 's/Х/H/g' -e 's/Ц/C/g' -e 's/Ч/C/g' -e 's/Џ/Dz/g' -e 's/Ш/S/g' \
-		-e 's/scriptencoding utf-8/scriptencoding latin1/' -e 's/" Original translations/" Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT/' \
+		-e 's/scriptencoding utf-8/scriptencoding latin1/' \
+		-e 's/" Original translations/" Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT/' \
 		menu_sr_rs.utf-8.vim > menu_sr_rs.ascii.vim
 	
 # Convert menu_uk_ua.utf-8.vim to create menu_uk_ua.cp1251.vim.
 menu_uk_ua.cp1251.vim: menu_uk_ua.utf-8.vim
 	rm -f menu_uk_ua.cp1251.vim
-	iconv -f utf-8 -t cp1251 menu_uk_ua.utf-8.vim | \
-		$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1251/' -e 's/" Original translations/" Generated from menu_uk_ua.utf-8.vim, DO NOT EDIT/' > menu_uk_ua.cp1251.vim
+	iconv -f UTF-8 -t CP1251 menu_uk_ua.utf-8.vim | \
+		$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1251/' \
+			-e 's/" Original translations/" Generated from menu_uk_ua.utf-8.vim, DO NOT EDIT/' \
+			> menu_uk_ua.cp1251.vim
 
 # Convert menu_uk_ua.utf-8.vim to create menu_uk_ua.koi8-u.vim.
 menu_uk_ua.koi8-u.vim: menu_uk_ua.utf-8.vim
 	rm -f menu_uk_ua.koi8-u.vim
-	iconv -f utf-8 -t koi8-u menu_uk_ua.utf-8.vim | \
-		$(SED) -e 's/scriptencoding utf-8/scriptencoding koi8-u/' -e 's/" Original translations/" Generated from menu_uk_ua.utf-8.vim, DO NOT EDIT/' > menu_uk_ua.koi8-u.vim
+	iconv -f UTF-8 -t KOI8-U menu_uk_ua.utf-8.vim | \
+		$(SED) -e 's/scriptencoding utf-8/scriptencoding koi8-u/' \
+			-e 's/" Original translations/" Generated from menu_uk_ua.utf-8.vim, DO NOT EDIT/' \
+			> menu_uk_ua.koi8-u.vim
 
 # Convert menu_hu_hu.utf-8.vim to create menu_hu_hu.iso_8859-2.vim.
 menu_hu_hu.iso_8859-2.vim: menu_hu_hu.utf-8.vim
 	rm -f menu_hu_hu.iso_8859-2.vim
-	iconv -f utf-8 -t iso8859-2 menu_hu_hu.utf-8.vim | \
-		$(SED) -e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' -e 's/" Original translations/" Generated from menu_hu_hu.utf-8.vim, DO NOT EDIT/' > menu_hu_hu.iso_8859-2.vim
+	iconv -f UTF-8 -t ISO-8859-2 menu_hu_hu.utf-8.vim | \
+		$(SED) -e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' \
+			-e 's/" Original translations/" Generated from menu_hu_hu.utf-8.vim, DO NOT EDIT/' \
+			> menu_hu_hu.iso_8859-2.vim
 
 # Convert menu_slovak_slovak_republic.1250.vim to create menu_sk_sk.iso_8859-2.vim.
 menu_sk_sk.iso_8859-2.vim: menu_slovak_slovak_republic.1250.vim
 	rm -f menu_sk_sk.iso_8859-2.vim
-	iconv -f cp1250 -t iso8859-2 menu_slovak_slovak_republic.1250.vim | \
-		$(SED) -e 's/scriptencoding cp1250/scriptencoding iso-8859-2/' -e 's/" Original translations/" Generated from menu_slovak_slovak_republic.1250.vim, DO NOT EDIT/' > menu_sk_sk.iso_8859-2.vim
+	iconv -f CP1250 -t ISO-8859-2 menu_slovak_slovak_republic.1250.vim | \
+		$(SED) -e 's/scriptencoding cp1250/scriptencoding iso-8859-2/' \
+			-e 's/" Original translations/" Generated from menu_slovak_slovak_republic.1250.vim, DO NOT EDIT/' \
+			> menu_sk_sk.iso_8859-2.vim