+static bool
+value_is_blank (const union value *val, int width, const struct dictionary *dict)
+{
+ mbi_iterator_t iter;
+ const char *str = CHAR_CAST_BUG (const char*, value_str (val, width));
+ char *text = recode_string (UTF8, dict_get_encoding (dict), str, width);
+
+ for (mbi_init (iter, text, width); mbi_avail (iter); mbi_advance (iter))
+ {
+ mbchar_t c = mbi_cur (iter);
+
+ if ( ! mb_isblank (c))
+ {
+ free (text);
+ return false;
+ }
+ }
+
+ free (text);
+ return true;
+}
+