[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

turkish patch problem: sed and binary files



Hi

I upgraded to Mandrake 8.1. Among the upgrdes were netscape (to 4.78,
which means that I had to repatch it) and an upgrade of sed, to
sed-3.02-12mdk .

I re-ran the turkish patch script, and noticed that it doesn't do
anything.

The body of this script is:

  ${SED} < ${NETSCAPE}.old -e 's/8859-8/8859-z/g' \
      -e 's/88598/8859z/g' -e 's/8859_8/8859_z/g'  | \
    ${SED} -e 's/8859-9/8859-8/g' -e 's/88599/88598/g' \
      -e 's/8859_9/8859_8/g' -e 's/Turkish/Hebrew /g' \
      -e 's/turkish/hebrew /g' -e 's/\[tr\]/\[he\]/g' | \
    ${SED} -e 's/8859-z/8859-9/g' -e 's/8859z/88599/g' \
      -e 's/8859_z/8859_9/g' > $NETSCAPE

After some elimination I noticed that sed does not seem to work with
binaries:

[tzafrir@canada1 ~ ]$ cat /usr/lib/netscape/netscape-communicator.old |sed -e 's/8859-8/8859-z/g' |strings |grep 8859-8
*documentFonts.charset*iso8859-8:                               x-ignore
iso-8859-8
ISO8859-8
[tzafrir@canada1 ~ ]$ cat /usr/lib/netscape/netscape-communicator.old |strings|sed -e 's/8859-8/8859-z/g' |strings |grep 8859-8
( No output )
[tzafrir@canada1 ~]$ cat /usr/lib/netscape/netscape-communicator.old |perl -p -e 's/8859-8/8859-z/g' |strings |grep 8859-8
( No output )

I figure I could rewrite this script using perl. But is there a better
alternative?

(It worked before...)

-- 
Tzafrir Cohen
mailto:tzafrir@technion.ac.il
http://www.technion.ac.il/~tzafrir



=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il