Please set encoding of file to utf-8.
You can create a new file and save as utf-8,
Otherwise you should get encoding of vCard file and tell the file reader.
For obtain encoding of the file you can use this method:
private static Encoding GetEncoding(string file)
{
using (var reader = new StreamReader(file, Encoding.Default, true))
{
if (reader.Peek() >= 0)
reader.Read();
return reader.CurrentEncoding;
}
}
and use it:
var encoding = GetEncoding("yourfile");
var lines = File.ReadAllLines("yourfile", encoding);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…