[Pkg-shadow-commits] r724 - in trunk: . debian

Nicolas FRANCOIS nekral-guest at costa.debian.org
Sun Dec 18 20:52:25 UTC 2005


Author: nekral-guest
Date: 2005-12-18 20:52:21 +0000 (Sun, 18 Dec 2005)
New Revision: 724

Added:
   trunk/debian/recode_manpages.sh
Modified:
   trunk/TODO
   trunk/debian/rules
Log:
Recode the manpages according to the encodings defined in the Debian's
man-db package.


Modified: trunk/TODO
===================================================================
--- trunk/TODO	2005-12-18 19:05:04 UTC (rev 723)
+++ trunk/TODO	2005-12-18 20:52:21 UTC (rev 724)
@@ -8,7 +8,6 @@
    + no more -f -s -g options to passwd. Use chfn, chsh and gpasswd
    instead
    + nologin
- * man pages encoding
 
 Things that should be done:
  * clean up the svn tag directory

Added: trunk/debian/recode_manpages.sh
===================================================================
--- trunk/debian/recode_manpages.sh	2005-12-18 19:05:04 UTC (rev 723)
+++ trunk/debian/recode_manpages.sh	2005-12-18 20:52:21 UTC (rev 724)
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# Upstream man pages are UTF-8encoded.
+# The man pages need to be recoded according to the encodings used in Debian.
+# (defined in src/encodings.c in man-db)
+
+# I've not found the encoding for zh_CN and zh_TW.
+# It should be the default falback ISO-8859-1.
+# However, the encoding of these pages seems wrong.
+
+echo "/     ISO-8859-1
+      cs    ISO-8859-2
+      de    ISO-8859-1
+      es    ISO-8859-1
+      fi    ISO-8859-1
+      fr    ISO-8859-1
+      hu    ISO-8859-2
+      id    ISO-8859-1
+      it    ISO-8859-1
+      ja    EUC-JP
+      ko    EUC-KR
+      pl    ISO-8859-2
+      pt_BR ISO-8859-1
+      ru    KOI8-R
+      tr    ISO-8859-9
+      zh_CN GB18030
+      zh_TW BIG5" |
+while read lang encoding
+do
+    echo "recoding lang: $lang to $encoding"
+    for page in debian/tmp/usr/share/man/$lang/man[1-8]/*
+    do
+        echo "recoding $page"
+        iconv -t $encoding -f UTF8 < $page > $page.recoded
+        mv $page.recoded $page
+    done
+done
+


Property changes on: trunk/debian/recode_manpages.sh
___________________________________________________________________
Name: svn:executable
   + *

Modified: trunk/debian/rules
===================================================================
--- trunk/debian/rules	2005-12-18 19:05:04 UTC (rev 723)
+++ trunk/debian/rules	2005-12-18 20:52:21 UTC (rev 724)
@@ -70,6 +70,7 @@
 	rm -rf debian/tmp
 	mkdir debian/tmp
 	$(MAKE) DESTDIR=$$(pwd)/debian/tmp install
+	./debian/recode_manpages.sh
 	touch install-stamp
 
 clean:	clean-patched unpatch




More information about the Pkg-shadow-commits mailing list