Fix unicode-related failures in CSV upload.

TNL-586

@adampalay 
should this be implemented as a generator? Idk if the size of the tables is a factor