I shouldn't have reverted it, it actually works

If we do not specify encoding here, system default encoding is used which isn't always utf8