Blame SOURCES/a2ps-4.13-autoenc.patch
|
|
0d8902 |
--- a2ps-4.13.rh/src/main.c Fri Feb 23 17:39:02 2001
|
|
|
0d8902 |
+++ a2ps-4.13.euc/src/main.c Fri Feb 23 23:07:40 2001
|
|
|
0d8902 |
@@ -31,6 +31,8 @@
|
|
|
0d8902 |
/* */
|
|
|
0d8902 |
/************************************************************************/
|
|
|
0d8902 |
#include <assert.h>
|
|
|
0d8902 |
+#include <string.h>
|
|
|
0d8902 |
+#include <locale.h>
|
|
|
0d8902 |
|
|
|
0d8902 |
#include "a2ps.h"
|
|
|
0d8902 |
#include "argmatch.h"
|
|
|
0d8902 |
@@ -925,6 +927,7 @@
|
|
|
0d8902 |
main (int argc, char *argv[])
|
|
|
0d8902 |
{
|
|
|
0d8902 |
int argn;
|
|
|
0d8902 |
+ char *locale;
|
|
|
0d8902 |
|
|
|
0d8902 |
/* Architecture specific initialization. */
|
|
|
0d8902 |
#ifdef __EMX__
|
|
|
0d8902 |
@@ -947,6 +950,9 @@
|
|
|
0d8902 |
setlocale (LC_CTYPE, "");
|
|
|
0d8902 |
setlocale (LC_PAPER, "");
|
|
|
0d8902 |
|
|
|
0d8902 |
+ locale = setlocale (LC_ALL, "");
|
|
|
0d8902 |
+ /* fprintf(stderr, "locale : %s\n", locale); */
|
|
|
0d8902 |
+
|
|
|
0d8902 |
bindtextdomain (PACKAGE, LOCALEDIR);
|
|
|
0d8902 |
textdomain (PACKAGE);
|
|
|
0d8902 |
|
|
|
0d8902 |
@@ -1013,6 +1019,10 @@
|
|
|
0d8902 |
yet read sheets. */
|
|
|
0d8902 |
sheets_map = sheets_map_new ();
|
|
|
0d8902 |
style_sheets = new_style_sheets ();
|
|
|
0d8902 |
+
|
|
|
0d8902 |
+ /* Process special case: Japanese Document */
|
|
|
0d8902 |
+ if (! strncmp (locale, "ja", 2) )
|
|
|
0d8902 |
+ job->requested_encoding_name = xstrdup ("euc-jp");
|
|
|
0d8902 |
|
|
|
0d8902 |
/* Process the command line options. */
|
|
|
0d8902 |
argn = a2ps_handle_options (job, argc, argv);
|