patch 8.0.0420: text garbled when the system encoding differs from 'encoding'
Problem: When running :make the output may be in the system encoding,
different from 'encoding'.
Solution: Add the 'makeencoding' option. (Ken Takata)
diff --git a/src/main.c b/src/main.c
index 0f9f3ff..2f8d291 100644
--- a/src/main.c
+++ b/src/main.c
@@ -559,11 +559,16 @@
*/
if (params.edit_type == EDIT_QF)
{
+ char_u *enc = NULL;
+
+# ifdef FEAT_MBYTE
+ enc = p_menc;
+# endif
if (params.use_ef != NULL)
set_string_option_direct((char_u *)"ef", -1,
params.use_ef, OPT_FREE, SID_CARG);
vim_snprintf((char *)IObuff, IOSIZE, "cfile %s", p_ef);
- if (qf_init(NULL, p_ef, p_efm, TRUE, IObuff) < 0)
+ if (qf_init(NULL, p_ef, p_efm, TRUE, IObuff, enc) < 0)
{
out_char('\n');
mch_exit(3);