Fix an encoding problem saving query editor model