Announcement

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

  • This document is not encoded in UTF-8!

    Background
    Iam using Stata Version 17.0
    The license is a shared university license and the application is stored in a shared drive
    I do not have administrator privileges

    Issue
    1. I tried to open a do. file which contains coding that I previously created 2-3 years ago and other do.files owned by other people
    2. However I got the message "This document is not encoded in UTF-8!" - picture attached
    3. If you press "convert to UTF-8" then the file opens with just the code "FilFSOH" and the actual code is not there
    4. I have read other posts about this message and the consensus seemed to indicate that the do file has been corrupted in some way
    5. However other users on the same system and same Stata Version have been able to open and see the actual code and do not get the error message

    Question
    1. Is this therefore an issue with my Stata rather than the do. file - and if so what personal settings would I have as it is a shared license
    2. Has anybody come across this before and have a solution

    Click image for larger version

Name:	712adea2-ce95-4195-96a3-3d93df183638.jpg
Views:	1
Size:	42.2 KB
ID:	1769416

  • #2
    It's almost certainly the file, not the Stata installation. You say you've tried to open several other do files besides the one you are interested in, but in every case the do file will not open, correct? If so, there may be a problem with the way you are transferring the do file's between machines or accessing the do files over your shared hard drive.

    Are you on windows? If so, try to open the do file with notepad. If the file isn't corrupt you should see the contents of the do file. Then copy and paste the content of the file into the do file editor to bypass opening the original file in Stata all together. That won't necessarily tell you what the problem is, but it should get you to the point where you can execute code again.

    If you can't open the file with notepad, if the notepad file contains characters that are not human-readable, or if the file is blank in notepad, then the file is either corrupt or empty.

    You might also consider reaching out to your university tech support.

    Comment


    • #3
      Thank you for replying.
      1. This error message does pop-up for multiple do files, however there are others that I can open and this does not pop up
      2. For the exact same files that I get this error message for, other users using the same shared drive are able to access it normally
      3. For the files that I can't open I have opened them in notepad and I get characters that are not human-readable (as you say) - but it's confusing to me how the same file is openable with normal code by other users

      Of note when I do open the files non-readable in notepad, the only words I can make out are "encryption admin group" and "Data Access [uniname.ac.uk/data]" and "Lipon Uddin (Wavex Domain Admin) - does this make anyone think its more of an access to files issue

      Addendum: I have just realised this issue only occurs when I try to open historic files that are located in a certain folder - again is this an access to files issue?

      I have also reached out to the university tech support - thank you

      Comment


      • #4
        The file is corrupt, encrypted, or you are trying to open a binary file like a .dta instead of a text file like a .do. If other people are able to read the file from the same location in the same folder without issue by opening the file the same way you try to, that's suggests the file may be encrypted. That would also suggest your university IT is doing some unusual security stuff like encrypting certain folders rather than taking advantage of user access controls and the encrypted folder isn't mounted for your account.

        At this point, your best bet is university IT.

        Comment


        • #5
          Thank you Daniel for your comments, it has helped me steer the conversation with university IT.

          Comment

          Working...
          X