DOS/UNIX/MAC line break/ending/terminator indication in status bar

DOS/UNIX/MAC line break/ending/terminator indication in status bar

6,687587
Grand MasterGrand Master
6,687587

    Sep 30, 2014#1

    UltraEdit < version 21.20.0.1009 and UES < version 14.30.0.1003 display in status bar always the line termination type as the stored file has.

    That means following for newline characters according to configuration at Advanced - Configuration - File Handling - DOS/Unix/Mac Handling:
    1. With Never prompt to convert files to DOS format selected, the line terminations in the stored file is equal the line termination of loaded file and indicated in status bar.
    2. With Prompt to convert if file is not DOS format selected and question to convert is answered with No for Unix/Mac files, the line termination in the stored file is equal the line termination of loaded file and indicated in status bar.
    3. With Prompt to convert if file is not DOS format selected and question to convert is answered with Yes for Unix/Mac files, the line termination of loaded file is DOS, but line termination in stored file as well as the indication in status bar depends on configuration setting Save file as input format (Unix/Mac/DOS).
      Unix/Mac is indicated with this option enabled as the stored file will have even after (most) edits still Unix or Mac line terminators as on opening of the file although the opened file has DOS line terminators.
      Otherwise the file is converted permanently to DOS on opening the file and therefore DOS is indicated also in status bar.
    4. With Automatically convert to DOS format selected, the opened file has always DOS line terminators (best when copying data via Windows clipboard to other Windows applications), but the line termination in stored file as well as the indication in status bar depends on configuration setting Save file as input format (Unix/Mac/DOS).
      Unix/Mac is indicated with this option enabled as the stored file will have even after (most) edits still Unix or Mac line terminators as on opening of the file although the opened file has DOS line terminators.
      Otherwise the file is converted permanently to DOS on opening the file and therefore DOS is indicated also in status bar.
    To summarize this indication behavior: In status bar is displayed the line termination type as the stored file has as long as the file is not loaded via FTP/SFTP with ASCII transfer resulting in conversion from Unix to DOS on download and DOS to Unix on upload by FTP client in UltraEdit.

    Starting with UE v21.20.0.1009 and UES v14.30.0.1003 the indication of the line termination type in status bar changed because of many user requests. Instead of displaying line termination type as the stored file has, the line termination type is displayed as the opened file has now in UE/UES. For the scenarios 3 and 4 this means DOS is always displayed even if a Unix/Mac file temporarily converted to DOS will be automatically converted back to Unix/Mac on every save because of enabled setting Save file as input format (Unix/Mac/DOS).

    I discussed this changed indication behavior with IDM support as there are files like Unix shell scripts which often must have Unix line terminators to work correct. Editing them on Windows with temporary conversion to DOS after download with binary transfer via FTP, or using a Samba share, or paste from a Linux virtual machine running on a Windows host can easily result in storing the file by mistake with DOS line terminators and the user does not get indicated this permanent conversion. There are commands like UTF-8 to ASCII (and all other encoding conversion commands) or switching to hex edit mode and back to text mode which result for a Unix/Mac file with temporary conversion to DOS on load in a silent permanent conversion to DOS. This could be seen easily in UE < 21.20.0.1009 and UES < 14.30 in status bar as indicated is the line termination of stored file and not as currently loaded.

    The outcome of our short discussion per email was to give the users the control over line terminator indication in status bar with a configuration setting added to Advanced - Configuration - File Handling - DOS/Unix/Mac Handling in UE v21.30.0.1005 and UES v14.40.
    • Status bar shows original line terminator format (on disk) not enabled as by default results in displaying the line termination as loaded file has currently in memory which means for scenario 3 and 4 that DOS is always displayed even if the Unix/Mac file is saved with Unix/Mac line terminators if setting Save file as input format (Unix/Mac/DOS) is enabled.
    • Status bar shows original line terminator format (on disk) enabled results in displaying the line termination as stored file currently has respectively will have on next save. So with this setting it can be seen in status bar even with a temporary conversion to DOS if the file is a Unix/Mac file on storage media.
    Best regards from an UC/UE/UES for Windows user from Austria

    11327
    MasterMaster
    11327

      Re: DOS/UNIX/MAC line break/ending/terminator/ indication in status bar

      Sep 30, 2014#2

      Thank you Mofi for useful information
      It's impossible to lead us astray for we don't care even to choose the way.