Fixed DB connection encoding