From 49b06a8f2a12f6553ad384032e108e351767ac1d Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Tue, 10 Nov 2015 22:44:41 +0100 Subject: encoding: Always use "utf-8" as default for &encoding Preverve the locale-depedency for fileencodings=default --- src/nvim/mbyte.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/nvim/mbyte.c') diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index b02c18c53b..44e30c1e7e 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -2417,11 +2417,8 @@ char_u *enc_canonize(char_u *enc) FUNC_ATTR_NONNULL_RET int i; if (STRCMP(enc, "default") == 0) { - /* Use the default encoding as it's found by set_init_1(). */ - char_u *r = get_encoding_default(); - if (r == NULL) - r = (char_u *)"latin1"; - return vim_strsave(r); + // Use the default encoding as found by set_init_1(). + return vim_strsave(fenc_default); } /* copy "enc" to allocated memory, with room for two '-' */ -- cgit