That would great Tamas, Thanks.
And Thanks to Ragi for you input.
I had a look at you workaround, but I think your ghetto fix is not quite correct.
The C# wrapper interprets the unmanaged string as being ANSI encoded, which changes the bytes of the string when converting from ANSI to UTF16 and not just fills in every second byte.
Your workaround might work for many non-ASCII characters, but not for all. 'ß' is an example that does not work.
If want a workaround that gets the correct string retroactively you would need to use:
string faultyStr = feature.GetFieldAsString(..);
string correctStr = Encoding.UTF8.GetString(Encoding.Default.GetBytes(faultyStr));
The reverse direction would be:
string faultyStr = Encoding.Default.GetString(Encoding.UTF8.GetBytes(correctStr));
feature.SetField(.., faultyStr);
Hopefully Tamas will fix the C# wrapper and we won't need the workaround anymore.
Or to be more exact, the workaround will obviously break things again, when the C# wrapper is fixed.
Tamas, please tell us, if we can be of assistance.
Greetings,
Dennis
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev