I send several letters to people in different cultures. Data comes from the file in the appropriate encoding. However, I need to read the first few lines to process them (get the topic, etc.), so I:
var lines = File.ReadAllLines(filename, encoding); ... read first few lines up to blank... lines = String.Join(newline, lines.skip(lineNum));
However, I do not know what to do to get the corresponding newline value. It is different for each encoding, and I cannot use Environment.NewLine, because I need a new line for the specific encoding of the email recipient, and not the encoding of the web server.
source share