+static int
+stc_custom_locale (struct lexer *lexer, struct dataset *ds UNUSED,
+ struct cmd_set *cmd UNUSED, void *aux UNUSED)
+{
+ const char *s;
+
+ lex_match (lexer, T_EQUALS);
+
+ if ( !lex_force_string (lexer))
+ return 0;
+
+ s = lex_tokcstr (lexer);
+
+ /* First try this string as an encoding name */
+ if ( valid_encoding (s))
+ set_default_encoding (s);
+
+ /* Now try as a locale name (or alias) */
+ else if (set_encoding_from_locale (s))
+ {
+ }
+ else
+ {
+ msg (ME, _("%s is not a recognized encoding or locale name"), 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);
+}
+