patch 8.1.0539: cannot build without the sandbox

Problem:    Cannot build without the sandbox.
Solution:   Set the secure option instead of using the sandbox.  Also restrict
            the characters from 'spelllang' that are used for LANG.vim.
            (suggested by Yasuhiro Matsumoto)
diff --git a/src/buffer.c b/src/buffer.c
index ee962b2..8235a4f 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5523,11 +5523,11 @@
 		current_sctx.sc_lnum = 0;
 #endif
 		// Make sure no risky things are executed as a side effect.
-		++sandbox;
+		++secure;
 
 		retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
 
-		--sandbox;
+		--secure;
 #ifdef FEAT_EVAL
 		current_sctx = save_current_sctx;
 #endif
diff --git a/src/option.c b/src/option.c
index a4a9c97..e6d46aa 100644
--- a/src/option.c
+++ b/src/option.c
@@ -7758,10 +7758,13 @@
 	     * '.encoding'.
 	     */
 	    for (p = q; *p != NUL; ++p)
-		if (vim_strchr((char_u *)"_.,", *p) != NULL)
+		if (!ASCII_ISALPHA(*p) && *p != '-')
 		    break;
-	    vim_snprintf((char *)fname, 200, "spell/%.*s.vim", (int)(p - q), q);
-	    source_runtime(fname, DIP_ALL);
+	    if (p > q)
+	    {
+		vim_snprintf((char *)fname, 200, "spell/%.*s.vim", (int)(p - q), q);
+		source_runtime(fname, DIP_ALL);
+	    }
 	}
 #endif
     }
diff --git a/src/version.c b/src/version.c
index 8569417..a6f155f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -793,6 +793,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    539,
+/**/
     538,
 /**/
     537,