good reading a textfile



A textfile can have different formats like ANSI,UTF8, Unicode ...
Using streamreader for a textfile can have different results for chars like
é,à,è....depending of the fileformat.
To solve this problem I have in the code analysed the chars in the beginning
of the textfile, named the BOM to see the system.text.encoding for using
this information in the streamreader.
But my question is :
Is there a way that vb.net can do this automatically?
Thanks for any response


.



Relevant Pages

  • to read a textfile regarding his format
    ... A textfile can have different formats like ANSI,UTF8, Unicode ... ... Using streamreader for a textfile can have different results for chars like ... To solve this problem I have in the code analysed the chars in the beginning ...
    (microsoft.public.dotnet.languages.vb)
  • Re: to read a textfile regarding his format
    ... but the sr didn't recognise a ANSI file made with notepad ... Using streamreader for a textfile can have different results for chars ...
    (microsoft.public.dotnet.languages.vb)
  • Re: to read a textfile regarding his format
    ... Michel Posseth ... Using streamreader for a textfile can have different results for chars ...
    (microsoft.public.dotnet.languages.vb)
  • Re: good reading a textfile
    ... Look for newsgroups with either the ... Using streamreader for a textfile can have different results for chars ...
    (comp.lang.basic.visual.misc)
  • Re: String von Ascii nach Ansi umwandeln
    ... Leider musste ich das Einlesen des Textfiles mit dem StreamReader - so hatte ich es zu Beginn - auf den Weg mit FileOpenumstellen. ... Das Textfile besteht aus ca 1/4 Million Datensätzen. ...
    (microsoft.public.de.german.entwickler.dotnet.vb)