필터 지우기
필터 지우기

Does this mean the file is corrupted?

조회 수: 4 (최근 30일)
MLP
MLP 2021년 4월 30일
댓글: MLP 2021년 4월 30일
Just came back to work on my code and found that several functions files open to these type of characters... is there a way to recover the actual code or are they completely lost? Why does this happen? If the files are lost I wouldn't like to lose a week's worth of work again.
  댓글 수: 2
Rik
Rik 2021년 4월 30일
The only alternative I can think of is that your file was encoded with ANSI, but now the editor thinks it is UTF-8. You can try opening these files in Notepad++ and see if messing with the encoding gets you closer to your original file.
And how to prevent this? Regular backups. There is a common wisdom that anything without a backup is not important. The absolute best practice is to have backups to 2 different off-site places (e.g. cloud storage), preferably on different continents and in different formats.
As to why this might have happened: it is impossible to tell from your description. We don't know your OS, your hardware, or even your Matlab version (other than that it is at least R2006a, since you can't change the editor colors in the way you did prior to that). Even if you did provide that information I couldn't tell you, because it isn't my area of expertise.
Walter Roberson
Walter Roberson 2021년 4월 30일
utf8 vs ascii would not explain the above. All us-ascii characters up to ~ (127) have exactly the same representation in utf8.

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2021년 4월 30일
Unfortunately your file is very likely gone. Check for asv files but don't be surprised if none are there.
I do not see any Magic Numbers that hint what the file might be now.
Does the character string NSpïžzè mean anything to you?
  댓글 수: 1
MLP
MLP 2021년 4월 30일
Does not dound familiar. I have never had this happened to me before, the only difference is that I am working from a folder located on an external hard drive where I got software installed that I use when working on different computers, so there is some plug/unplug going on. Although this matlab function was the only one affected, the main program and other functions are OK.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by