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