]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0024: z/OS (MVS) support can be improved v9.1.0024
authorIgor Todorovski <itodorov@ca.ibm.com>
Fri, 12 Jan 2024 16:59:18 +0000 (17:59 +0100)
committerChristian Brabandt <cb@256bit.org>
Fri, 12 Jan 2024 16:59:18 +0000 (17:59 +0100)
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>
src/option.c
src/option.h
src/version.c

index 2372c1aa9b1197e1c1bb2a083916512a4c41834b..14447f59bae77ee921101f6f2043f5440566ec4f 100644 (file)
@@ -450,9 +450,10 @@ set_init_default_encoding(void)
     char_u     *p;
     int                opt_idx;
 
-# ifdef MSWIN
+# if defined(MSWIN) || defined(__MVS__)
     // MS-Windows has builtin support for conversion to and from Unicode, using
     // "utf-8" for 'encoding' should work best for most users.
+    // z/OS built should default to UTF-8 mode as setlocale does not respect utf-8 environment variable locales
     p = vim_strsave((char_u *)ENC_DFLT);
 # else
     // enc_locale() will try to find the encoding of the current locale.
index 646056bf111b440df534650c0fcfe51576693e92..0cf6a8cf6d4a86bb6061c2feaa7f423d498c466f 100644 (file)
@@ -130,7 +130,7 @@ typedef enum {
 #define ENC_UCSBOM     "ucs-bom"       // check for BOM at start of file
 
 // default value for 'encoding'
-#ifdef MSWIN
+#if defined(MSWIN) || defined(__MVS__)
 # define ENC_DFLT      "utf-8"
 #else
 # define ENC_DFLT      "latin1"
index 0099da595f6ac48fac719f1da464ce2d70d65628..5fba3dec25c634baa8087341f90914929499727c 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    24,
 /**/
     23,
 /**/