[Debian-l10n-commits] r2743 - /dl10n/trunk/compendia/msg2utf8
bubulle at users.alioth.debian.org
bubulle at users.alioth.debian.org
Sat Aug 6 17:54:51 UTC 2011
Author: bubulle
Date: Sat Aug 6 17:54:50 2011
New Revision: 2743
URL: http://svn.debian.org/wsvn/?sc=1&rev=2743
Log:
Commit....unknown origin changes that were sitting on churro
Modified:
dl10n/trunk/compendia/msg2utf8
Modified: dl10n/trunk/compendia/msg2utf8
URL: http://svn.debian.org/wsvn/dl10n/trunk/compendia/msg2utf8?rev=2743&op=diff
==============================================================================
--- dl10n/trunk/compendia/msg2utf8 (original)
+++ dl10n/trunk/compendia/msg2utf8 Sat Aug 6 17:54:50 2011
@@ -11,19 +11,13 @@
notutf8 ()
{
- if [ -x /usr/bin/isutf8 ]
- then
- /usr/bin/isutf8 "$1" && return 1 || return 0
- fi
- [ -z "`file "$1" | grep -v UTF-8`" ] && return 1 || return 0
+ grep -m 1 "Content-Type: .*; charset=.*\n" "$1" | grep -qi "utf-8" && return 1 || return 0
}
if notutf8 "$1"
then
echo "W: $1: was not UTF-8 encoded"
- msgconv -t utf-8 "$1" > "$1.utf" &&
- cat "$1.utf" | \
- sed 's#Content-Type:\ text/plain;\ charset=.*\n"$#Content-Type: text/plain; charset=UTF-8\n"#' > "$1"
+ msgconv -t utf-8 -o "$1" "$1"
else
echo "I: $1: already UTF-8 encoded"
fi
More information about the Debian-l10n-commits
mailing list