bugfix: encoding could be blank here

Signed-off-by: zeljko <zeljko@zwr.fi>