Proper handling of encoding.