Fix issue 334, adding urlquote functionality

I've added test for issue reproducing and simple solution for this issue. Please review.
Yes, it's necessary. Test case is valid only when column are both Unicode and Primary Key. Otherwise the bug isn't triggered