db encoding fix