comparison src/mbyte.c @ 24754:a4cb7499fa11 v8.2.2915

patch 8.2.2915: MS-Windows: when using "default" for encoding utf-8 is used Commit: https://github.com/vim/vim/commit/ef8706fb84cfe8bd58b1b26b0742e42caf09655b Author: K.Takata <kentkt@csc.jp> Date: Mon May 31 18:40:49 2021 +0200 patch 8.2.2915: MS-Windows: when using "default" for encoding utf-8 is used Problem: MS-Windows: when using "default" for encoding utf-8 is used. Solution: Use the system encoding. (Ken Takata, closes https://github.com/vim/vim/issues/8300)
author Bram Moolenaar <Bram@vim.org>
date Mon, 31 May 2021 18:45:03 +0200
parents 7da496081b91
children 7334bf933510
comparison
equal deleted inserted replaced
24753:1018030b38b2 24754:a4cb7499fa11
4451 char_u *p, *s; 4451 char_u *p, *s;
4452 int i; 4452 int i;
4453 4453
4454 if (STRCMP(enc, "default") == 0) 4454 if (STRCMP(enc, "default") == 0)
4455 { 4455 {
4456 #ifdef MSWIN
4457 // Use the system encoding, the default is always utf-8.
4458 r = enc_locale();
4459 #else
4456 // Use the default encoding as it's found by set_init_1(). 4460 // Use the default encoding as it's found by set_init_1().
4457 r = get_encoding_default(); 4461 r = get_encoding_default();
4462 #endif
4458 if (r == NULL) 4463 if (r == NULL)
4459 r = (char_u *)ENC_DFLT; 4464 r = (char_u *)ENC_DFLT;
4460 return vim_strsave(r); 4465 return vim_strsave(r);
4461 } 4466 }
4462 4467