I want to read an txt-file with StreamReader and then give it to TextBlock. The Code is for a Windows Phone App and is in C#:
var resource = System.Windows.Application.GetResourceStream(new Uri("File.txt", UriKind.Relative));
StreamReader sreader = new StreamReader(resource.Stream);
while ((line = sreader.ReadLine()) != null)
{
TextBlock.Text = sreader.ReadLine();
}
This read all the Text from the file to my TextBlock, but I have special characters in it, like ä or ü or ö and they don't display in the TextBlock. How can I display these characters in my TextBlock?