Encoding fix

Fixes https://github.com/rembo10/headphones/issues/1754