fix get_db_prep_value when value is unicode