quick fix for using encoding when selecting db