Missing characters when reading from a file
- From: Gaël Rosset <gael@xxxxxxxxxxxx>
- Date: Wed, 30 May 2007 15:41:40 +0200
Hello,
I have the following reader function :
public static string[] fileReadAllLines(string strFileName)
{
ArrayList content = new ArrayList();
using (StreamReader sr = File.OpenText(strFileName))
{
string input;
while ((input = sr.ReadLine()) != null)
{
content.Add(input);
}
sr.Close();
}
return toStringArray(content);
}
which also can be replaced with :
public static string[] fileReadAllLines(string strFileName)
{
return File.ReadAllLines(strFileName);
}
Both those methods remove all special characters (é,è,ø,æ,...) from the stream, what to do to get them ?
Thanks
.
- Follow-Ups:
- Re: Missing characters when reading from a file
- From: Morten Wennevik [C# MVP]
- Re: Missing characters when reading from a file
- Prev by Date: Cancelling Form.Load event
- Next by Date: Re: No more type ahead searching for treenodes in VS 2005?
- Previous by thread: Cancelling Form.Load event
- Next by thread: Re: Missing characters when reading from a file
- Index(es):
Relevant Pages
|