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
Jason Hedrick
NA
4
0
Problem Reading unicode files
Jul 20 2008 10:31 PM
Below is the code I am using to attempt to open a text file. Are there any problems with it? Every time i run it only the first character of the file is read. I am attempting to read from unicode .txt files if that makes a difference.
PS: Ok i just checked only my unicoded .txt files wont open correctly. Standard .txt files will.
if (openFileDialog1.ShowDialog() != DialogResult.Cancel)
{
StreamReader
fs
=
new
StreamReader( new FileStream(openFileDialog1.FileName, FileMode.OpenOrCreate, FileAccess.Read));
while (fs.Peek() != -1)
{
leftBox.Text += fs.ReadToEnd();
}
fs.Close();
}
Reply
Answers (
1
)
Log query search, tricky with efficient non-overlaping interval
Accesing variable/function in Control using (Control)Sender