use \obeylines instead of \endlinechar