Fix unicode handling for patches

Change-Id: Iafe7b3ab228f8f5136fd03b149fcef78e9e71372