Marc Scheuner <no.spam@for.me> wrote:[color=blue][color=green]
> >You can't. Any Windows-1252 file, for instance, is an equally valid
> >file in other code pages which use all possible values.[/color]
>
> Drats..... I was afraid of that answer :-)
>[color=green]
> >Of course, a better solution would be to ask whatever
> >produces the file to do the right thing in the first place, if possible
> >- where are you getting the file from?[/color]
>
> It's an file being exchanged between a host app and our app at a
> customers site - they *claim* it's UTF-8 and they even put that in the
> XML header - yet, it's really an ANSI (Encoding.Default) file, and
> that throws off the XML deserialization.....[/color]
So can you ask the authors of the "host app" to fix things?
--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too