MrNobody <(E-Mail Removed)> wrote:
> Damn, thought this was going to be easy...
>
> I used a hex editor to compare the files and I see the original file appears
> ' tighter', not separated by null bytes (00), while my file I write is (so I
> guess my file is 32 bit while the original is not ??). So between every
> character is this 00 null byte in my file.
>
> Also my file has some kind of small header (FF FE) while the original file
> just starts right away with text.
>
> Any idea how I can write such a file using c# ? what output stream?
Which file? The one with no 00 bytes? Just use a StreamWriter and the
relevant encoding, eg Encoding.UTF8, Encoding.Default or
Encoding.ASCII.
It sounds like currently you've got Encoding.Unicode with a BOM (byte-
ordering mark).
--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too