Hello, > Invoking "ed -s file.txt", where file does not contain a newline at > the end, sends to stderr in spite of -s flag: "newline appended". > Is this normal behaviour?
Yes, the "-s" option concern only messages printed on stdout. > Does ed/sed spoil files with non ascii bytes (for example unicode > characters)? > By experience seems to me that they, as also lex, do not spoil the > files, that one can edit them, but I do not know to what extent, if > there is a risk. ed uses the C stdio functions. So, printing and editing will be correct until the charsets of both your file and your terminal are the same. Nevertheless, ASCII characters MUST stay on one byte in this charset. So you cannot use it with UTF-16 and UTF-32.

