Do you want to convert the file to DOS format?

Do you want to convert the file to DOS format?

6
NewbieNewbie
6

    May 21, 2006#1

    Hello.

    My UltraEdit program sometimes says, when I start to open PHP files: "Do you want to convert the file to DOS format?"

    It doesn't do it all of the time.

    I have a Dell Dimension computer that is running the Windows Me OS. I upload files to a server using the FTP program. It's a Linux OS on the server.

    The PHP files that display the message typically have not been downloaded from the server.

    Does anybody know what could be the problem?

    Thanks.

    40
    Basic UserBasic User
    40

      May 21, 2006#2

      This is not a 'problem', simply these files are not in DOS format - which means they do not use Carriage Return + Line Feed characters (0x0D 0x0A) as a line terminator.
      Windows/DOS use CR + LF to mark a new line, Unix (like) and Mac's use either CR only or LF only (not sure which uses which)

      You can set what UE should do with non DOS files by clicking Advanced / Configuration / File handling / DOS/Unix/Mac handling

      6
      NewbieNewbie
      6

        May 22, 2006#3

        I found how to adjust the settings under the Configuration menu yesterday.

        But what I'm trying to figure out is why I'm getting the prompt in the first place?

        The prompt just happens occasionally. I'm working on a website. When the prompt does occur it occurs on one of the PHP files inside one of the folders for the website. Most of the files do not give the prompt message.

        40
        Basic UserBasic User
        40

          May 23, 2006#4

          Well, some of your files are in DOS format and some in UNIX format. It's hard to say why it is like that. Anyway it's not an UE problem, UE just detects the file type.

          Many ftp apps (when working in ASCII transfer mode or in 'auto-select' mode) auto-convert files from one format to another depending on the type of client & server. For example if you transfer a file in ASCII mode from Windows to Unix, some ftp apps will replace CR+LF with LF only. Some servers auto-convert uploaded files too.

          If you transfer the files in binary mode, they should be transferred 1:1 without whatever modifications.

          In general, you shouldn't care about this. I have auto-convert to DOS + save as input format options checked, and never had problems. Indeed in certain cases these options may not be what you want.

          6
          NewbieNewbie
          6

            Jun 02, 2006#5

            I said this earlier:
            The PHP files that display the message typically have not been downloaded from the server.
            I think that I may have made a mistake. I must have downloaded the files (the ones that were giving the prompt about converting from Unix to DOS) from the server. That's the reason they were in the Unix format.

            Sorry for the mistake.

            2

              Jun 13, 2006#6

              I am using UE-32 prof 10.00b

              I want to turn off the question

              Do you want to Convert 'myfile name and path' to DOS format.

              I have read somewhere that I can do this with:

              Advanced
              Configuration
              General
              File Handling Items

              Now I might be blind, but I cannot see an option to change this in the named window. How should it be called, are you sure it is there, and is it there in all version.

              I must say I find the question irritating, since I do not want to convert a certain file to DOS format. But in the stress of trying to get something working, you will at one point in time, click 'Yes', in mistake.

              Marc Wentink

              6,612548
              Grand MasterGrand Master
              6,612548

                Jun 13, 2006#7

                As I have written at ASCII DOS Unix File format settings and File change while opening an XML file with UltraEdit and you maybe has read already, the best setting is to convert Unix/MAC files automatically to DOS for editing, but save it in input format.

                Especially with v10.00 which does not have the feature On Paste convert line ending to destination type (UNIX/MAC/DOS) you should not work with Unix files edited in Unix mode. You can get bad line endings when you copy/paste with other applications in a different format. I have tested a lot on this issue.

                However, the configuration dialog was completely redesigned and so most advanced forum users write here how to change a setting for the actual configuration dialog.

                What you want to change in v10.00 is in menu Advanced - menu item Configuration - tab General - section Load/Save/Conversions which starts at line 30. So you have to scroll down in the General tab. The help of UE even in v10.00 explains these settings.

                2

                  Jun 15, 2006#8

                  Thanks a lot, I found it, must have been a bit blind I guess.... :oops:

                  1
                  NewbieNewbie
                  1

                    Jun 17, 2006#9

                    The best setting is to convert Unix/MAC files automatically to DOS for editing, but save it in input format.
                    Yeah, after some experimentation, I just came to the same conclusion.

                    Just be aware that, with this setting, the HEX view will not accurately reflect the bytes on disk for files with UNIX line endings. The HEX view will show 0D0A line endings when, in reality, the file on disk contains 0A line endings. At first that was disconcerting to me.

                    I guess you have to train your brain to look at the status bar. If it says UNIX, you know that it will be saved to disk using 0A line endings. Not too bad -- it's probably the best solution to the line-endings problem, especially considering copy and paste compatibility with other Windows applications. When in Rome do as the Romans. When editing text on Windows OS, use CRLF line endings to ensure interoperability with your other applications. UltraEdit, with the above settings, intelligently saves back to the file's input format.

                    Allen