diff --git a/SuSEconfig.groff b/SuSEconfig.groff index 822f140..e3ca080 100644 --- a/SuSEconfig.groff +++ b/SuSEconfig.groff @@ -1,4 +1,3 @@ -#!/bin/bash # # Copyright (c) 1998 S.u.S.E. Gmbh Fuerth, Germany. # 2002 SuSE Linux AG, Nuernberg, Germany. diff --git a/bugzilla-292412-special-encoding-handling-also-for-chinese.patch b/bugzilla-292412-special-encoding-handling-also-for-chinese.patch new file mode 100644 index 0000000..b859c59 --- /dev/null +++ b/bugzilla-292412-special-encoding-handling-also-for-chinese.patch @@ -0,0 +1,13 @@ +Index: groff-1.18.1.1/src/libs/libgroff/encoding.cc +=================================================================== +--- groff-1.18.1.1.orig/src/libs/libgroff/encoding.cc ++++ groff-1.18.1.1/src/libs/libgroff/encoding.cc +@@ -392,7 +392,7 @@ init_encoding_handler() + else + charset = ""; + #endif +- if (strncmp(locale, "ja", 2) == 0) { ++ if (strncmp(locale, "ja", 2) == 0||strncmp(locale,"zh" ,2) == 0) { + select_input_encoding_handler(charset); + select_output_encoding_handler(charset); + } else if ((!device || strcmp(device, "ascii8") == 0)) { diff --git a/groff.changes b/groff.changes index d692d95..d66e2c7 100644 --- a/groff.changes +++ b/groff.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jul 24 11:51:08 CEST 2007 - mfabian@suse.de + +- Bugzilla #292412: make the hacks for Chinese less weird by + applying the patch from comment #31 by Peng Wu + and adapting the patch to /usr/bin/nroff. +- remove shebang from SuSEconfig.groff (is sourced, not executed). + ------------------------------------------------------------------- Mon Jul 23 19:41:27 CEST 2007 - mfabian@suse.de diff --git a/groff.spec b/groff.spec index 5fd6ad0..76504fc 100644 --- a/groff.spec +++ b/groff.spec @@ -21,7 +21,7 @@ Obsoletes: jgroff Prereq: %fillup_prereq %install_info_prereq Autoreqprov: on Version: 1.18.1.1 -Release: 85 +Release: 86 Summary: GNU troff Document Formatting System URL: http://www.gnu.org/software/groff/groff.html Source0: ftp://ftp.gnu.org/gnu/groff/groff-1.18.1.1.tar.bz2 @@ -40,6 +40,7 @@ Patch7: double-free.patch Patch8: groffer-security.patch Patch9: groff-1.18.1.1-gcc41.patch Patch10: bugzilla-217106-too-few-arguments-in-function-call.patch +Patch11: bugzilla-292412-special-encoding-handling-also-for-chinese.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -71,6 +72,7 @@ Authors: %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 %build # remove empty backups @@ -171,6 +173,11 @@ popd /var/adm/fillup-templates/sysconfig.suseconfig-groff %changelog +* Tue Jul 24 2007 - mfabian@suse.de +- Bugzilla #292412: make the hacks for Chinese less weird by + applying the patch from comment #31 by Peng Wu + and adapting the patch to /usr/bin/nroff. +- remove shebang from SuSEconfig.groff (is sourced, not executed). * Mon Jul 23 2007 - mfabian@suse.de - Bugzilla #292412: add some more hacks to /usr/bin/nroff to support Chinese man pages as well. diff --git a/gxdview.spec b/gxdview.spec index 1ba71fa..005b14c 100644 --- a/gxdview.spec +++ b/gxdview.spec @@ -17,7 +17,7 @@ Autoreqprov: on Requires: groff Conflicts: jgxdview Version: 1.18.1.1 -Release: 97 +Release: 98 Summary: Ditroff Output Displayer for Groff URL: http://www.gnu.org/software/groff/groff.html Source0: ftp://ftp.gnu.org/gnu/groff/groff-1.18.1.1.tar.bz2 diff --git a/utf8.patch b/utf8.patch index 1fc5abe..f998301 100644 --- a/utf8.patch +++ b/utf8.patch @@ -1,3 +1,4 @@ + diff -ru groff-1.18.1.1.orig/src/roff/nroff/nroff.sh groff-1.18.1.1/src/roff/nroff/nroff.sh --- groff-1.18.1.1.orig/src/roff/nroff/nroff.sh 2007-07-23 19:22:48.000000000 +0200 +++ groff-1.18.1.1/src/roff/nroff/nroff.sh 2007-07-23 19:27:54.000000000 +0200 @@ -84,22 +85,22 @@ diff -ru groff-1.18.1.1.orig/src/roff/nroff/nroff.sh groff-1.18.1.1/src/roff/nro + # and convert the result to UTF-8 using iconv: + T=-Tnippon + export LC_ALL=ja_JP.eucJP -+ ICONV="iconv -f $LEGACY_ENCODING -t UTF-8" ++ ICONV="iconv -f EUC-JP -t UTF-8" + ;; + zh_TW*) + T=-Tnippon -+ export LC_ALL=ja_JP.eucJP -+ ICONV="iconv -f $LEGACY_ENCODING -t UTF-8" ++ export LC_ALL=zh_TW.Big5 ++ ICONV="iconv -f Big5 -t UTF-8" + ;; + zh_HK*) + T=-Tnippon -+ export LC_ALL=ja_JP.eucJP -+ ICONV="iconv -f $LEGACY_ENCODING -t UTF-8" ++ export LC_ALL=zh_HK.Big5HKSCS ++ ICONV="iconv -f Big5HKSCS -t UTF-8" + ;; + zh*) + T=-Tnippon -+ export LC_ALL=ja_JP.eucJP -+ ICONV="iconv -f $LEGACY_ENCODING -t UTF-8" ++ export LC_ALL=zh_CN.GB18030 ++ ICONV="iconv -f GB18030 -t UTF-8" + ;; +# Czech, Hungarian, ... and Russian man-pages don't need special treatment in nroff anymore +# with man-2.4.3 because man already does the necessary conversions (see bugzilla #230030).