fixing postgres db encoding