comparison src/mbyte.c @ 24912:02fa8d72e4e3 v8.2.2993

patch 8.2.2993: 'fileencodings' default value should depend on 'encoding' Commit: https://github.com/vim/vim/commit/5ffefbb35aba2448099314a9e09714d2f3b2b1bd Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 13 20:27:36 2021 +0200 patch 8.2.2993: 'fileencodings' default value should depend on 'encoding' Problem: 'fileencodings' default value should depend on 'encoding'. (Gary Johnson) Solution: When 'encoding' is "utf-8" use a different default value for 'fileencodings'.
author Bram Moolenaar <Bram@vim.org>
date Sun, 13 Jun 2021 20:30:03 +0200
parents 14b86681e6e6
children 042560a16d4e
comparison
equal deleted inserted replaced
24911:fd37be6dc258 24912:02fa8d72e4e3
731 // When enc_utf8 is set or reset, (de)allocate ScreenLinesUC[] 731 // When enc_utf8 is set or reset, (de)allocate ScreenLinesUC[]
732 screenalloc(FALSE); 732 screenalloc(FALSE);
733 733
734 // When using Unicode, set default for 'fileencodings'. 734 // When using Unicode, set default for 'fileencodings'.
735 if (enc_utf8 && !option_was_set((char_u *)"fencs")) 735 if (enc_utf8 && !option_was_set((char_u *)"fencs"))
736 set_string_option_direct((char_u *)"fencs", -1, 736 set_fencs_unicode();
737 (char_u *)"ucs-bom,utf-8,default,latin1", OPT_FREE, 0);
738 737
739 #if defined(HAVE_BIND_TEXTDOMAIN_CODESET) && defined(FEAT_GETTEXT) 738 #if defined(HAVE_BIND_TEXTDOMAIN_CODESET) && defined(FEAT_GETTEXT)
740 // GNU gettext 0.10.37 supports this feature: set the codeset used for 739 // GNU gettext 0.10.37 supports this feature: set the codeset used for
741 // translated messages independently from the current locale. 740 // translated messages independently from the current locale.
742 (void)bind_textdomain_codeset(VIMPACKAGE, 741 (void)bind_textdomain_codeset(VIMPACKAGE,