OgrProvider: fix query encoding issues