I found they current dos2unicx doesn't remove \r . I am not sure if it has ever remove them.
On Fri, Dec 26, 2025, 16:02 Michael Ewan <[email protected]> wrote: > There is an easier way than using 'sed', use dos2unix command instead, > it has been available since the early days of PC's being on the same > network as UNIX servers. > Either > sudo apt install dos2unix > or > dnf install dos2unix > > On Fri, Dec 26, 2025 at 11:08 AM Tomas Kuchta > <[email protected]> wrote: > > > > I do not see your file, but I often get trouble with \r at the line ends, > > messing up a lot of things in linux. > > > > If that is the case here try to strip \r from the file before converting > it > > to ascii. > > > > I do it like this: > > cat file | sed 's/\r//g' > anotherFile > > > > Color codes from grep and such wreck about the same havoc while also > being > > invisible. > > > > Hope that helps, > > Tomas > > > > On Thu, Dec 25, 2025, 16:38 American Citizen <[email protected]> > > wrote: > > > > > Rich: > > > > > > owner@localhost:~> iconv -f UTF-8 -t ASCII ttt.txt -o ttt.ascii > > > iconv: illegal input sequence at position 465 > > > owner@localhost:~> > > > > > > So I cannot hammer a UTF-8 file into ASCII > > > > > > owner@localhost:~> iconv -f ASCII -t UTF-8 ttt.ascii.txt -o > ttt.utf-8.txt > > > owner@localhost:~> file ttt.utf-8.txt > > > ttt.utf-8.txt: ASCII text > > > owner@localhost:~> > > > > > > so nothing really changed. > > > > > > Randall > > > > > > On 12/25/25 13:24, Rich Shepard wrote: > > > > On Thu, 25 Dec 2025, American Citizen wrote: > > > > > > > >> My locale command shows identical values to yours. They match > exactly. > > > > > > > > Randall, > > > > > > > > Were I in the same situation I'd use iconv on each ASCII file. Read > `man > > > > iconv'. > > > > > > > > Example: To convert ASCII to UTF-8 in Linux, you can use the iconv > > > > command. > > > > The syntax is: iconv -f ASCII -t UTF-8 input_file.txt -o > output_file.txt. > > > > > > > > HTH, > > > > > > > > Rich > > > >
