def METHOD_NAME(fn, result, encoding):
    f = open("@", "w")
    try:
        f.write(result.encode(encoding))
    finally:
        f.close()
    try:
        fn = fn.replace('"', '\\"')
        return os.system('diff -u "%s" @' % fn)
    finally:
        os.remove("@")