now working with other encodings as well. Always converted to utf-8