added char encoding