aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gen-bugnote
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2013-09-07 00:18:10 +0000
committerGerald Combs <gerald@wireshark.org>2013-09-07 00:18:10 +0000
commitac93afc00b40abe61d92e02171541a284379362f (patch)
treee72de796e480bc1f54afd393bb3206b0dd4a85f5 /tools/gen-bugnote
parentf9f29d0307d514d9ed4dec7cf22920cd9af99571 (diff)
Use "recode" to convert HTML entities to UTF-8 if it's available.
svn path=/trunk/; revision=51806
Diffstat (limited to 'tools/gen-bugnote')
-rwxr-xr-xtools/gen-bugnote7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/gen-bugnote b/tools/gen-bugnote
index 1a20ddb04f..2625477d9b 100755
--- a/tools/gen-bugnote
+++ b/tools/gen-bugnote
@@ -40,6 +40,9 @@ shift $(($OPTIND - 1))
bz_url_pfx="https://bugs.wireshark.org/bugzilla/show_bug.cgi?id="
bug_id="$1"
+recode_cmd="cat"
+hash recode > /dev/null 2>&1 && recode_cmd="recode html..utf8"
+
case "$OSTYPE" in
darwin*)
clipboard_cmd="pbcopy -Pascii"
@@ -72,7 +75,9 @@ bug_title=`
case "$output_fmt" in
asciidoc)
- echo -n "* $bug_title (ws-buglink:$bug_id[])" | $clipboard_cmd
+ echo -n "* $bug_title (ws-buglink:$bug_id[])" \
+ | $recode_cmd \
+ | $clipboard_cmd
;;
docbook)
$clipboard_cmd <<Fin