N
Nick
Hi,
I have used the following code to test the encoding of a file :
public string DetermineFileType(string aFileName)
{
string sEncoding = string.Empty;
StreamReader oSR = new StreamReader(aFileName, true);
oSR.ReadToEnd(); // Add this line to read the file.
sEncoding = oSR.CurrentEncoding.EncodingName;
return sEncoding;
}
from:
http://groups.google.com.hk/groups?...%20encoding&hl=zh-TW&lr=&ie=UTF-8&sa=N&tab=wg
But the encoding is always showing Unicode? What's wrong?
Thanks
Nick
I have used the following code to test the encoding of a file :
public string DetermineFileType(string aFileName)
{
string sEncoding = string.Empty;
StreamReader oSR = new StreamReader(aFileName, true);
oSR.ReadToEnd(); // Add this line to read the file.
sEncoding = oSR.CurrentEncoding.EncodingName;
return sEncoding;
}
from:
http://groups.google.com.hk/groups?...%20encoding&hl=zh-TW&lr=&ie=UTF-8&sa=N&tab=wg
But the encoding is always showing Unicode? What's wrong?
Thanks
Nick