Manually encoding/decoding non-latin1 shit... christ...