Fix shapefile encoding detection
Merge remote-tracking branch 'origin/bug/CDB-775' into release/2.4.0