FIX: encoding issue with very large databases (> 500 000 000 records)