Non DOS file display issue?

Non DOS file display issue?

1
NewbieNewbie
1

    15:02 - Aug 09#1

    Version 2024.0.0.35

    I relied on UE to visually validate files as being in good order and visually they looked good, however, when processed in Python I discovered every other line was empty. I opened one of the files in Notepad++ and it properly displays the empty lines. 

    UltraEdit
    ue.png (43.6KiB)

    Notepad++
    np.png (4.15KiB)

    Please help me to understand this behavior and how to setup UE to mirror Notepad++

    I have tried all of the Display and File handling options and the best I can tell is the file has a mix of non-dos and dos line terminators.

    I did not see this behavior in early version of UE.

    6,672577
    Grand MasterGrand Master
    6,672577

      18:02 - Aug 09#2

      There is no possibility with UltraEdit for Windows v2024.0.0.35 (and also v22.20.0.49 as verified by me too) to get CR CR LF displayed in text edit mode with enabled showing of line endings
      • with ± as placeholder for a carriage return as used for the Mac line ending type (just carriage return) and get this carriage return also interpreted as newline character, and
      • with as placeholder for carriage return plus line feed as used for the DOS/Windows line ending type on one more empty line.
      It is only possible to get the erroneous carriage return not automatically removed by UltraEdit and show it as standard character by having setting Automatically convert to DOS format not selected as otherwise the erroneous carriage return is automatically removed by UltraEdit (on opening for display and in file on storage media on next save). Some fonts have no glyph defined for this whitespace character. There is displayed a rectangle at the end of every line for the erroneous carriage return by these fonts and on showing of line endings currently enabled. There is used by default by UltraEdit the font Consolas which displays the carriage return like a normal space because of being a whitespace character which is not so good to see that erroneous newline character.

      It looks like Notepad++ replaces for the display of the newline characters a carriage return by the two characters C and R and a line feed by the two characters L and F. UltraEdit v2024.0.0.35 has no such special newline character display mode with replacing one newline character by two ASCII letters.

      There is the symbol for carriage return with Unicode code point value U+240D and the symbol for line feed with Unicode code point value U+240A. But these two symbols are very small in most fixed-width fonts and not often used for that reason as far as I know.

      I switch with Ctrl+H to hex edit mode and use Revert to saved for reloading the file in binary mode because of having selected by default Automatically convert to DOS format and see if there is a mixture of line ending types in the file if I suppose there is something wrong with a text file.

      There can be searched also for ^r^p (no regular expression or UltraEdit regular expression) or for \r\r\n (Unix/Perl regular expression) on suspecting the existence of such an invalid line ending type caused by a not good coded program or script or wrong downloaded file from an FTP server.

      There is in the traditional menu Search the command Character properties which is named Character info in ribbon mode on ribbon tab Edit in second group Review and in contemporary menu Edit to get displayed information about the character at current position of the text cursor in active file. Try that out with text cursor left to "space" at the line end and there can be see that this character has decimal value 13 (hexadecimal 0xd) which is not 32 (0x20) as a normal space has.

      There can be sent only a feature request to UltraEdit support on wanting a display of newline characters like in Notepad++ in a future version of UltraEdit and UEStudio.

      Hint: Open the Manage Themes dialog window, select second tab Editor and configure a font color like red or blue for last but one item Spaces, tabs, line ends. Then the placeholder characters for normal space, horizontal tab, just CR, just LF and CR+LF can be seen better. A "space" not displayed with a red/blue middle dot is not a normal space. It could be a no-break space or a carriage return or another whitespace. The command for showing the character properties/information should be used on such a "space".
      Best regards from an UC/UE/UES for Windows user from Austria