You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.5 KiB

--- a2ps-4.13/etc/a2ps-site.cfg.in.encoding 2000-01-15 23:39:36.000000000 +0000
+++ a2ps-4.13/etc/a2ps-site.cfg.in 2002-08-05 10:22:20.000000000 +0100
@@ -11,7 +11,7 @@
#################################################################
# Default encoding
-Options: --encoding=@ENCODING@
+#Options: --encoding=@ENCODING@
# Default medium
Options: --medium=@MEDIUM@
--- a2ps-4.13/src/main.c.encoding 2002-08-05 10:22:20.000000000 +0100
+++ a2ps-4.13/src/main.c 2002-08-05 10:22:20.000000000 +0100
@@ -32,6 +32,7 @@
/************************************************************************/
#include <assert.h>
#include <string.h>
+#include <langinfo.h>
#include <locale.h>
#include "a2ps.h"
@@ -1021,9 +1022,8 @@
sheets_map = sheets_map_new ();
style_sheets = new_style_sheets ();
- /* Process special case: Japanese Document */
- if (! strncmp (locale, "ja", 2) )
- job->requested_encoding_name = xstrdup ("euc-jp");
+ /* Use locale to set default encoding. */
+ job->requested_encoding_name = xstrdup (nl_langinfo (CODESET));
/* Process the command line options. */
argn = a2ps_handle_options (job, argc, argv);
--- a2ps-4.13/encoding/encoding.map.encoding 2002-08-05 10:22:20.000000000 +0100
+++ a2ps-4.13/encoding/encoding.map 2002-08-05 10:38:55.000000000 +0100
@@ -45,6 +45,7 @@
latin1 iso1
iso1 iso1
iso-8859-1 iso1
+ansi_x3.4-1968 iso1
latin2 iso2
iso2 iso2
@@ -128,3 +129,6 @@
# Apple' Macintosh
mac mac
macintosh mac
+
+# We don't handle UTF-8 at all yet. Sometimes latin1 will work...
+utf-8 iso1