String encode working