Description: Use /usr/bin/printf if available when decoding URLs.
 dash's printf doesn't understand \xHH sequences.
Author: Per Olofsson <pelle@debian.org>
Bug: http://bugs.debian.org/613272

--- a/scripts/xdg-open.in
+++ b/scripts/xdg-open.in
@@ -182,7 +182,11 @@ open_generic()
         # Decode URLs
         if echo "$file" | grep -q '^file:///'; then
             file=${file#file://}
-            file="$(printf "$(echo "$file" | sed -e 's@%\([a-f0-9A-F]\{2\}\)@\\x\1@g')")"
+            local printf=printf
+            if [ -x /usr/bin/printf ]; then
+                printf=/usr/bin/printf
+            fi
+            file="$($printf "$(echo "$file" | sed -e 's@%\([a-f0-9A-F]\{2\}\)@\\x\1@g')")"
         fi
         check_input_file "$file"
 
