Closed FrankHileman closed 2 months ago
Actually the field _utf8EncodingNoBOM
is not needed; the static read only property would be sufficient.
Thank you @FrankHileman for your diligence and the detailed suggestions you provided. I’ve implemented the fix based on your recommendations, and it’s now in place. Please feel free to check if the new code works for you. If any issues arise, feel free to reopen this ticket.
In the recent changes adding stream support, we use a constructor for
StreamWriter
that results in using internally aUTF8Encoding
that writes a BOM (byte order mark). At least one version of Arcgis cannot process such a file, and winds up having no projection. My colleague reported this; I don't have a license for Arcgis. I have figured out how to fix the problem, but not knowing if it is a thorough fix, I am attaching a patch file here, instead of using a pull request.Note that if you use the
UTF8Encoding
constructor that takes a boolean, and pass it false, no BOM is written using such an encoding.projection_bom_fix.patch