Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading text files & special charachters
Message
From
26/08/2005 05:33:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Miscellaneous
Thread ID:
01043844
Message ID:
01044224
Views:
12
>Hi,
>
>At this moment I'm trying to read some text from a file and place this text in a textbox.
>
>Dim sr As StreamReader = File.OpenText("c:\myfile.txt")
>TextBox1.Text = sr.ReadToEnd()
>sr.Close()
>
>The streamreader reads my text but ignores special characters likes "é", "ë". Which reader will "read" these characters?
>
>tia,
>Sander Bouwmeester
// C#
StreamReader sr = new StreamReader(@"c:\myFile.txt",Encoding.GetEncoding(1252));
textBox1.Text = sr.ReadToEnd();
sr.Close();

' I think translates as:
Dim sr As StreamReader = new StreamReader("c:\myFile.txt",Encoding.GetEncoding(1252))
TextBox1.Text = sr.ReadToEnd()
sr.Close()
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform