Split out from #172. The text search function should be able to search for text in non-ASCII encodings.