lc = (0, 0)
hunk = 0
-
- for line in text.split('\n'):
+ for line in text.decode('utf-8').split('\n'):
line += '\n'
if state == 0:
(options, args) = parser.parse_args()
- (patch, comment) = parse_patch(sys.stdin.read())
+ # decode from (assumed) UTF-8
+ content = sys.stdin.read().decode('utf-8')
+
+ (patch, comment) = parse_patch(content)
if options.print_hash and patch:
print hash_patch(patch).hexdigest()