set default encoding in the initializer