setQuery() takes both unicode and bytes

then correctly handles conversions to produce meaningful result
refs #35
tests for edgecases

refs #35