Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Accessing my do file

    Greetings

    I am working on stata and using a do file that i have been successfully opening every time i need to use it. However i am now trying to access it and there is a pop up window displaying "The document is not encoded in UTF-8". I am therefore unable to access my do file. Please help.

    Kind Regards
    Nonsi Nkomo

  • #2
    Yopu might be able to open it a simple text editor to extract the code, then save a s a new do file

    Comment


    • #3
      Would i open the simple text editor in Stata?

      Comment


      • #4
        No, I mean the text editor in windows or other operating system. Browse to the do file and open with the notepad in windows, for example.

        Comment


        • #5
          I have attempted to open in in notepad but the code is still coming up as a code i am unable to read.

          Comment


          • #6
            I hope someone else has a better idea, but sounds to me like your do file got corrupted then. Not sure there's any fix to it.

            Comment


            • #7
              Ok thank you for the help Jorrit.

              Kind Regards
              Nonsi Nkomo

              Comment


              • #8
                I suspect you overwrote your do-file with your data. If that's the case, your do-file is gone.

                When saving files, avoid changing the file extension. Stata will append the correct file extension if one does not exist but it will use whatever file extension you insist on using. For example, if you select File > Save as from the main Stata window and enter the filename myfile, Stata will save the the data as myfile.dta. If however, you enter the filename as myfile.do, Stata will save the data as myfile.do.
                -Chinh Nguyen

                Comment


                • #9
                  Thank you for the help Chinh.

                  Kind Regards
                  Nonsi Nkomo

                  Comment

                  Working...
                  X