Bug: Streamreader.ReadLine omits special characters

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Henry

    Bug: Streamreader.ReadLine omits special characters

    Hi,

    reading a textfile with the ReadLine method of a Streamreader objects the
    resulting string does not contain the special characters from the source
    file: e.g. Paragraph § and all the umlauts are missing.

    Is there a work around or solution for this problem?

    Thanks in advance
    --
    Best regards

    Henry
  • Anand[MVP]

    #2
    RE: Bug: Streamreader.Re adLine omits special characters

    If you are using any special encoding format, then you need to specify that
    when you open the stream.

    Dim sr As New StreamReader(fs , Encoding.GetEnc oding(1256))

    Rgds,
    Anand M
    VB.NET MVP


    "Henry" wrote:
    [color=blue]
    > Hi,
    >
    > reading a textfile with the ReadLine method of a Streamreader objects the
    > resulting string does not contain the special characters from the source
    > file: e.g. Paragraph § and all the umlauts are missing.
    >
    > Is there a work around or solution for this problem?
    >
    > Thanks in advance
    > --
    > Best regards
    >
    > Henry[/color]

    Comment

    Working...