G
Guest
I'm working on an integration project to move data from my own XML format to
a legacy file format, so this file may be manually imported into the
downstream app.
The downstream app internally recognizes Unicode characters. However, the
import engine on the downstream app chokes on the byte-order-marks BOM in the
files created with anything but ASCII encoding when I write the file.
I have no means for upgrading or fixing this issue in the downstream app.
If I use Excel to save the Unicode / UTF8 file as ANSI, the lone unicode
character in the file is preserved but the BOM is removed. The ANSI file
imports without problem in the downstream app, and the unicode character is
recognized and is processed as expected.
In the System.IO classes, every file I create gets a BOM. How can I avoid
this, or, how can I strip off the BOM? If I write the file with the ASCII
encoding, I get ? instead of my unicode character. How does Excel preserve
the character but strip the BOM?
I realize this is not an elegant design ... but legacy format is critically
important to my customer. Thanks to all in advance,
-David
a legacy file format, so this file may be manually imported into the
downstream app.
The downstream app internally recognizes Unicode characters. However, the
import engine on the downstream app chokes on the byte-order-marks BOM in the
files created with anything but ASCII encoding when I write the file.
I have no means for upgrading or fixing this issue in the downstream app.
If I use Excel to save the Unicode / UTF8 file as ANSI, the lone unicode
character in the file is preserved but the BOM is removed. The ANSI file
imports without problem in the downstream app, and the unicode character is
recognized and is processed as expected.
In the System.IO classes, every file I create gets a BOM. How can I avoid
this, or, how can I strip off the BOM? If I write the file with the ASCII
encoding, I get ? instead of my unicode character. How does Excel preserve
the character but strip the BOM?
I realize this is not an elegant design ... but legacy format is critically
important to my customer. Thanks to all in advance,
-David