diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-01-02 18:05:52 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-01-02 18:05:52 -0500 |
commit | 59eaba28948137acbd89f31dce1558d97228b9cd (patch) | |
tree | 0240a406e072ed50276d6f167ca6659103f20a22 /src/nvim/mbyte.c | |
parent | cb625940422ddfb25fdb9a6dc6c6a26a56a228e8 (diff) | |
parent | 70f6e2ce52b966866f57ee5a1753ba420b1bd1a4 (diff) | |
download | rneovim-59eaba28948137acbd89f31dce1558d97228b9cd.tar.gz rneovim-59eaba28948137acbd89f31dce1558d97228b9cd.tar.bz2 rneovim-59eaba28948137acbd89f31dce1558d97228b9cd.zip |
Merge pull request #3655 from bfredl/enc_default
Default to encoding=utf-8
Diffstat (limited to 'src/nvim/mbyte.c')
-rw-r--r-- | src/nvim/mbyte.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index b02c18c53b..fdd83f9dac 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -568,11 +568,6 @@ char_u * mb_init(void) /* When enc_utf8 is set or reset, (de)allocate ScreenLinesUC[] */ screenalloc(false); - /* When using Unicode, set default for 'fileencodings'. */ - if (enc_utf8 && !option_was_set((char_u *)"fencs")) - set_string_option_direct((char_u *)"fencs", -1, - (char_u *)"ucs-bom,utf-8,default,latin1", OPT_FREE, 0); - #ifdef HAVE_WORKING_LIBINTL /* GNU gettext 0.10.37 supports this feature: set the codeset used for * translated messages independently from the current locale. */ @@ -2417,11 +2412,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 '-' */ |