Add helper to decode and encode utf8

Change-Id: I600324d36229df8aec3676a16ce58454ed56fa5c