Correctly encode utf-8 data, remove workaround util