Compatibility issue bugfixes

- Tried to fix compatibility with various CSV encodings, platforms, etc.
- Tested using various CSV file exports
- Not tested cross-platform