Fix query encoding of special chars on Qt4.