Detect patch character encoding dynamically
Most patches are plain ASCII, but some are ISO-8859-1 and some are UTF-8. We must detect the encoding before we can decode the byte string and apply regularly expressions to the patch text.
Signed-off-by: Major Hayden major@redhat.com