mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
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 #8300)
This commit is contained in:
@@ -4453,8 +4453,13 @@ enc_canonize(char_u *enc)
|
||||
|
||||
if (STRCMP(enc, "default") == 0)
|
||||
{
|
||||
#ifdef MSWIN
|
||||
// Use the system encoding, the default is always utf-8.
|
||||
r = enc_locale();
|
||||
#else
|
||||
// Use the default encoding as it's found by set_init_1().
|
||||
r = get_encoding_default();
|
||||
#endif
|
||||
if (r == NULL)
|
||||
r = (char_u *)ENC_DFLT;
|
||||
return vim_strsave(r);
|
||||
|
Reference in New Issue
Block a user