diff options
author | Gerald Combs <gerald@wireshark.org> | 2020-01-13 14:11:42 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2020-01-13 22:12:44 +0000 |
commit | 6e7f08781d5a16a612174fb7604e19fb87d442af (patch) | |
tree | 27154c8b5f6ef6674ca87f9972dc7360a1d1b735 /tools/gen-bugnote | |
parent | 216c4b26735e80d8f15a77a6e86271fe527283ce (diff) |
Gen-bugnote: Another encoding fix.
Change-Id: Icf9fe7cd392cce2dac8ba45854c9f4c00a80dd38
Reviewed-on: https://code.wireshark.org/review/35791
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'tools/gen-bugnote')
-rwxr-xr-x | tools/gen-bugnote | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/gen-bugnote b/tools/gen-bugnote index 0b0fc9be3f..48058cb668 100755 --- a/tools/gen-bugnote +++ b/tools/gen-bugnote @@ -13,11 +13,14 @@ bz_url_pfx="https://bugs.wireshark.org/bugzilla/show_bug.cgi" bug_id="$1" -recode_cmd="cat" # Bugzilla gives us UTF-8 with HTML escapes. We want UTF-8. Recode assumes # that HTML is encoded as ISO-8859-1. # https://github.com/rrthomas/Recode/issues/1 -hash recode > /dev/null 2>&1 && recode_cmd="recode utf8..html | recode html..utf8" +recode_to_html_cmd="cat" +if hash recode > /dev/null 2>&1 ; then + recode_to_html_cmd="recode utf8..html" + recode_to_utf8_cmd="recode html..utf8" +fi case "$OSTYPE" in darwin*) @@ -52,7 +55,8 @@ bug_title=$( ) echo -e "* $bug_title wsbuglink:${bug_id}[].\\n" \ - | $recode_cmd \ + | $recode_to_html_cmd \ + | $recode_to_utf8_cmd \ | $clipboard_cmd echo "Copied $bug_id: $bug_title" |