patch 9.1.0024: z/OS (MVS) support can be improved
Commit:
https://github.com/vim/vim/commit/497e5282b6d21b99c01c6ecc6bf41b9b1781df6a
Author: Igor Todorovski <[email protected]>
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 <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/option.c b/src/option.c
index 2372c1aa9..14447f59b 100644
--- a/src/option.c
+++ b/src/option.c
@@ -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.
diff --git a/src/option.h b/src/option.h
index 646056bf1..0cf6a8cf6 100644
--- a/src/option.h
+++ b/src/option.h
@@ -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"
diff --git a/src/version.c b/src/version.c
index 0099da595..5fba3dec2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 24,
/**/
23,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/E1rOL7W-008j8A-IQ%40256bit.org.