+static int
+stc_custom_locale (struct lexer *lexer, struct dataset *ds UNUSED,
+ struct cmd_set *cmd UNUSED, void *aux UNUSED)
+{
+ const struct string *s;
+
+ lex_match (lexer, '=');
+
+ if ( !lex_force_string (lexer))
+ return 0;
+
+ s = lex_tokstr (lexer);
+
+ /* First try this string as an encoding name */
+ if ( valid_encoding (ds_cstr (s)))
+ set_default_encoding (ds_cstr (s));
+
+ /* Now try as a locale name (or alias) */
+ else if (set_encoding_from_locale (ds_cstr (s)))
+ {
+ }
+ else
+ {
+ msg (ME, _("%s is not a recognised encoding or locale name"),
+ ds_cstr (s));
+ return 0;
+ }
+
+ lex_get (lexer);
+
+ return 1;
+}
+
+static int
+stc_custom_messages (struct lexer *lexer, struct dataset *ds UNUSED,
+ struct cmd_set *cmd UNUSED, void *aux UNUSED)
+{
+ return set_output_routing (lexer, SETTINGS_OUTPUT_NOTE);
+}
+
+static int
+stc_custom_printback (struct lexer *lexer, struct dataset *ds UNUSED,
+ struct cmd_set *cmd UNUSED, void *aux UNUSED)
+{
+ return set_output_routing (lexer, SETTINGS_OUTPUT_SYNTAX);
+}
+
+static int
+stc_custom_results (struct lexer *lexer, struct dataset *ds UNUSED,
+ struct cmd_set *cmd UNUSED, void *aux UNUSED)
+{
+ return set_output_routing (lexer, SETTINGS_OUTPUT_RESULT);
+}
+