More improvements to encoding handling. There is now a server encoding that