As suggested by @KirkKuykendall:
Instead of using new MxDocumentClass to start arcmap.exe, you might
try the more customary way ... using ProcessStartInfo with
ProcessWindowStyle.Minimized, then Process.Start. Then listen to
AppROTEvents.AppAdded to get an IApplication reference.
I've debugged the issue thoroughly and found the route cause. GDAL library itself returns correct value as a pointer to the attribute string, but the C# bindings, generated by SWIG, have some strange code that truncates valid UTF-8 string into a broken one.
It may be because we use an outdated GDAL.Core Nuget package, or the issue is in the binding itself. ...
ITopologicalOperator.Difference is behaving correctly. The issue is that the SpatialQuery is not returning the expected feature. The following query returns at least two if not all three blue features in the screenshot above:
ISpatialFilter spaFil = new SpatialFilterClass();
spaFil.Geometry = mergedSUOFeature.Shape;
spaFil.GeometryField = publicHighwaysFC....