A file in ms-dos text format (carriage return & linefeed) when loaded and edited and then saved in nano used to be saved by nano as unix format (just a linefeed). As of a week (or so) ago, this no longer happens. Now when nano saves, it no longer converts the new saved file to unix (linefeed only) format. Most likely there was a version change (to nano) caused by an "emerge world" and the new version of nano has a new bug or problem. I attempted to work around this problem by adding "unset noconvert" to my ~/.nanorc file but that has had no effect. Reproducible: Always Steps to Reproduce: 1. create a file (not in nano) that is a text file in ms-dos format. The way I do this is to boot uinto windows and run notepad or edit.com. name the file test.txt 2. boot into linux (if not in linux already) and type "nano test.txt" 3. in nano, make a change, any change, to the file (just add a space, for example) 4. save the file via control-o and then pressing enter 5. examine the file in a hex editor and see if any CR (ascii 13, hex 0d) characters remain in the file. If they are still there, you have succefully replicated this bug Actual Results: the saved file had CR-LF pairs at each end of line Expected Results: the saved file should have LF only at the end of line, not CR-LF Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r11 i686) ================================================================= System uname: 2.6.11-gentoo-r11 i686 Intel(R) Pentium(R) 4 CPU 1500MHz Gentoo Base System version 1.6.12 Python: dev-lang/python-2.3.5 [2.3.5 (#1, May 5 2005, 03:02:47)] dev-lang/python: 2.3.5 sys-apps/sandbox: [Not Present] sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.5, 1.9.5, 1.8.5-r3, 1.4_p6, 1.6.3, 1.7.9 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.16 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" LDFLAGS="-Wl,-O1" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X alsa apm arts avi berkdb bitmap-fonts cdr crypt cups curl doc emboss encode esd fam flac foomaticdb fortran gdbm gif gnome gpm gtk gtk2 gtkhtml guile imagemagick imlib ipv6 java jpeg junit kde libg++ libwww mad mikmod mmx motif mp3 mpeg ncurses nls ogg oggvorbis opengl oss pam pdflib perl png python qt quicktime readline real sdl slang speex spell sse2 ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts vorbis xine xml xml2 xmms xv zlib ~canna ~cjk ~freewnn userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LINGUAS, PORTDIR_OVERLAY
works fine for me $ echo "blah" > foo $ unix2dos foo $ nano foo <add some lines and save> $ file foo foo: ASCII text, with CRLF line terminators i normally have 'set noconvert' in my .nanorc but once i commented out the line it worked fine
try nano-1.3.8
works for me in 1.3.8