fix utf8 encode/decode in labels plugin