Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading text files & special charachters
Message
De
26/08/2005 05:33:19
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Divers
Thread ID:
01043844
Message ID:
01044224
Vues:
11
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform