diff --git a/ChangeLog b/ChangeLog
index 8477f9dae3ef8ca3a65234cdc1a8a8a98d4e705f..bc9ffa893d0b7a6615fa35f8c6d041e034da0484 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -54,12 +54,15 @@ CVS code -
 	  and NANO_APPEND_KEY are.  Changes to shortcut_init(), usage(),
 	  main(), search_init(), nanorc.sample, nano.1, nanorc.5,
 	  nano.texi, etc. (DLR)
-	- Various cleanups in chars.c.  Remove some unnecessary (w)ctype
-	  wrappers; change other ctype wrappers to take wint_t instead
-	  of wchar_t; rename some functions for consistency; and don't
-	  count matches between valid and invalid multibyte sequences
-	  anymore, as it causes problems when doing a replace.  New
-	  function is_valid_mbstring(); changes to is_alnum_mbchar(),
+	- Various cleanups and improvements in chars.c.  Remove some
+	  unnecessary w?ctype wrappers; change other ctype wrappers to
+	  take wint_t instead of wchar_t; rename some functions for
+	  consistency; add functions to detect blank characters in a
+	  string, for use in rcfile option parsing; and don't count
+	  matches between valid and invalid multibyte sequences anymore,
+	  as it causes problems when doing a replace.  New functions
+	  is_valid_mbstring(), has_blank_chars(), and
+	  has_blank_mbchars(); changes to is_alnum_mbchar(),
 	  is_blank_char() (renamed nisblank()), is_blank_mbchar(),
 	  is_blank_wchar() (renamed niswblank()), is_cntrl_wchar(),
 	  control_rep(), control_mbrep(), make_mbstring() (renamed
@@ -189,6 +192,9 @@ CVS code -
   parse_rcfile()
 	- Properly generate an error if we get an invalid multibyte
 	  string for an option, instead of working around it. (DLR)
+	- Use has_blank_mbchars() to check for blank characters in the
+	  "punct" and "brackets" options, and clarify the error message
+	  displayed when we find blank characters. (DLR)
 - search.c:
   do_gotoline()
 	- Properly show an error message if we try to go to line 0,
diff --git a/src/chars.c b/src/chars.c
index e5a821596fb5211da006f358d4ed0627a48a64b3..066f89e93a3d521f07f0034f6fe6b0f14433c663 100644
--- a/src/chars.c
+++ b/src/chars.c
@@ -795,6 +795,54 @@ size_t mbstrnlen(const char *s, size_t maxlen)
 }
 
 #ifndef DISABLE_JUSTIFY
+#ifdef ENABLE_NANORC
+/* Return TRUE if the string s contains one or more blank characters,
+ * and FALSE otherwise. */
+bool has_blank_chars(const char *s)
+{
+    assert(s != NULL);
+
+    for (; *s != '\0'; s++) {
+	if (isblank(*s))
+	    return TRUE;
+    }
+
+    return FALSE;
+}
+
+/* Return TRUE if the multibyte string s contains one or more blank
+ * multibyte characters, and FALSE otherwise. */
+bool has_blank_mbchars(const char *s)
+{
+    assert(str != NULL);
+
+#ifdef NANO_WIDE
+    if (!ISSET(NO_UTF8)) {
+	char *chr_mb = charalloc(MB_CUR_MAX);
+	bool retval = FALSE;
+
+	while (*s != '\0') {
+	    int chr_mb_len;
+
+	    chr_mb_len = parse_mbchar(s, chr_mb, NULL, NULL);
+
+	    if (is_blank_mbchar(chr_mb)) {
+		retval = TRUE;
+		break;
+	    }
+
+	    s += chr_mb_len;
+	}
+
+	free(chr_mb);
+
+	return retval;
+    } else
+#endif
+	return has_blank_chars(s);
+}
+#endif
+
 /* This function is equivalent to strchr() for multibyte strings. */
 char *mbstrchr(const char *s, char *c)
 {
diff --git a/src/proto.h b/src/proto.h
index a41e647f5307a1453d7f45301bc757d1ff8f4ee7..fac5ab275fee9192c9893bbf46e8e1dcaca0239e 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -219,6 +219,10 @@ size_t nstrnlen(const char *s, size_t maxlen);
 #endif
 size_t mbstrnlen(const char *s, size_t maxlen);
 #ifndef DISABLE_JUSTIFY
+#ifdef ENABLE_NANORC
+bool has_blank_chars(const char *s);
+bool has_blank_mbchars(const char *s);
+#endif
 char *mbstrchr(const char *s, char *c);
 #endif
 
diff --git a/src/rcfile.c b/src/rcfile.c
index de855b64b8b115e34c824c82d02830363f6a058a..da74fc80d6af3b436b23f35c3462486742ee3ceb 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -620,20 +620,18 @@ void parse_rcfile(FILE *rcstream)
 #ifndef DISABLE_JUSTIFY
 			if (strcasecmp(rcopts[i].name, "punct") == 0) {
 			    punct = option;
-			    if (strchr(punct, '\t') != NULL ||
-				strchr(punct, ' ') != NULL) {
+			    if (has_blank_mbchars(punct)) {
 				rcfile_error(
-					N_("Non-tab and non-space characters required"));
+					N_("Non-blank characters required"));
 				free(punct);
 				punct = NULL;
 			    }
 			} else if (strcasecmp(rcopts[i].name,
 				"brackets") == 0) {
 			    brackets = option;
-			    if (strchr(brackets, '\t') != NULL ||
-				strchr(brackets, ' ') != NULL) {
+			    if (has_blank_mbchars(brackets)) {
 				rcfile_error(
-					N_("Non-tab and non-space characters required"));
+					N_("Non-blank characters required"));
 				free(brackets);
 				brackets = NULL;
 			    }