handle empty encoded string