comparison src/option.c @ 34120:7d9358937eb9 v9.1.0024

patch 9.1.0024: z/OS (MVS) support can be improved Commit: https://github.com/vim/vim/commit/497e5282b6d21b99c01c6ecc6bf41b9b1781df6a Author: Igor Todorovski <itodorov@ca.ibm.com> Date: Fri Jan 12 17:59:18 2024 +0100 patch 9.1.0024: z/OS (MVS) support can be improved Problem: z/OS (MVS) support can be improved Solution: set UTF-8 as the default encoding for z/OS closes: #13821 Signed-off-by: Igor Todorovski <itodorov@ca.ibm.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Fri, 12 Jan 2024 18:15:02 +0100
parents a197265a2e07
children e7d64a3fffe4
comparison
equal deleted inserted replaced
34119:d59bf8151c23 34120:7d9358937eb9
448 set_init_default_encoding(void) 448 set_init_default_encoding(void)
449 { 449 {
450 char_u *p; 450 char_u *p;
451 int opt_idx; 451 int opt_idx;
452 452
453 # ifdef MSWIN 453 # if defined(MSWIN) || defined(__MVS__)
454 // MS-Windows has builtin support for conversion to and from Unicode, using 454 // MS-Windows has builtin support for conversion to and from Unicode, using
455 // "utf-8" for 'encoding' should work best for most users. 455 // "utf-8" for 'encoding' should work best for most users.
456 // z/OS built should default to UTF-8 mode as setlocale does not respect utf-8 environment variable locales
456 p = vim_strsave((char_u *)ENC_DFLT); 457 p = vim_strsave((char_u *)ENC_DFLT);
457 # else 458 # else
458 // enc_locale() will try to find the encoding of the current locale. 459 // enc_locale() will try to find the encoding of the current locale.
459 // This works best for properly configured systems, old and new. 460 // This works best for properly configured systems, old and new.
460 p = enc_locale(); 461 p = enc_locale();