1 --- a2ps-4.15.4/src/main.c.orig 2023-06-11 20:01:18.534593494 +0200
2 +++ a2ps-4.15.4/src/main.c 2023-06-11 20:02:16.417613248 +0200
11 @@ -917,6 +918,7 @@ int
12 main (int argc, char *argv[])
17 /* Name under which this program was called. */
18 program_name = base_name (argv[0]);
19 @@ -928,6 +930,8 @@ main (int argc, char *argv[])
20 setlocale (LC_CTYPE, "");
21 setlocale (LC_PAPER, "");
23 + locale = setlocale (LC_ALL, "");
25 bindtextdomain (PACKAGE, LOCALEDIR);
26 bindtextdomain (PACKAGE "-gnulib", LOCALEDIR);
28 @@ -988,6 +992,10 @@ main (int argc, char *argv[])
29 sheets_map = sheets_map_new ();
30 style_sheets = new_style_sheets ();
32 + /* Process special case: Japanese Document */
33 + if ((locale != NULL) && ! strncmp (locale, "ja", 2) )
34 + job->requested_encoding_name = xstrdup ("euc-jp");
36 /* Process the command line options. */
37 argn = a2ps_handle_options (job, argc, argv);