FDO OGR 4.1 still has problems with Latin1/ISO-8859-1 when using MapInfo TAB
Back in 2012 I posted this question: http://osgeo-org.1560.x6.nabble.com/FDO-OGR-3-6-3-7-and-UTF-8-problem-td3898674.html The OGR provider when reading MapInfo TAB files treat the data as if it was UTF-8. However MapInfo never supported UTF-8 or unicode characters, and for wester european countries it uses Latin1/ISO-8859-1/Windows1252.
This problems seems to persist in FDO OGR 4.1 used by MapGuide 3.1
From MapInfo 15.2 and forward, MapInfo does support unicode characters, but I have no checked if the FDO OGR provider can read the new format at all.
The solutions back then was for me to recompile the provider and forcing it to use ISO-8859-1 and removing support for UTF-8/unicode from all the other files as well.
The right thing would be for the provider to read the information from the TAB file (written in clear text) what character set is used for the data in the DAT file. Are there any plans to implement this, or do I need to create a ticket to get it fixed?
Before C# took over, I wrote a lot of c++ code. I could update the code myself and post a fix, but I have absolutely no clue where to start.
Re: FDO OGR 4.1 still has problems with Latin1/ISO-8859-1 when using MapInfo TAB
I am not familiar with Vanilla (Google search did not reveal anything), however I tried a simple console application and using the 4.0 binaries.
A name with a danish/latin letter like:
turns out as:
If I try to convert the name from UTF8 to bytes and back to a string:
byte bytes = System.Text.Encoding.UTF8.GetBytes(name);
string newname = System.Text.Encoding.GetEncoding("ISO-8859-1").GetString(bytes);
I get this output: