TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
pseudobill2004
NA
44
0
Reading file text "as is"
Jan 19 2005 1:37 PM
I'm reading text from a file with the following code: System.IO.FileStream oReadStream = new System.IO.FileStream(sFile, System.IO.FileMode.Open, System.IO.FileAccess.Read); System.IO.StreamReader oReader = new System.IO.StreamReader(oReadStream, System.Text.Encoding.ASCII); this.txtMyTextbox.Text = oReader.ReadToEnd(); The problem is that special character strings such as: "x²" or "90°" are read as "x?" and "90?". If I change System.Text.Encoding.ASCII to System.Text.Encoding.UTF7 these two get read correctly, but other standard xml strings don't. Is there a way to read the file contents exactly as is? i.e., the same as if I copied the file contents via the clipboard directly into the textbox? (this works fine)
Reply
Answers (
1
)
Array of pointers to member variables?
create reg_expand_sz key in registry