Cannot open RMarkdown file

Hello I was working on a project in r markdown with Rstudio. Usually I leave some r markdown files open in the r studio. But I cannot open the main file and don' t know how to recover at least the plain text code.
The other files are available and I can open them but not the most important. This is the error:
image
And in the console when I try the open it shows:

Error: embedded nul in string: '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\ ecc.ecc.

Is there a method to open this file? or at least recover its rmarkdown script?
This file weight 36k so it's should not have lost its content inside, infact the other rmd file with 7.2k opens correctly. I really don't understand what happened to that file...
Thanks!

This is a weird issue.

Can it be open in another text editor ? Can you share the Rmd document ?

Seems like a corruption somewhere while saving the file in the IDE. Is this still happening with other files ?

Hi, I have a similar problem. I saved the file yesterday evening then got this error when I tried reopening it the next morning. Any help will be appreciated (I tried attaching the MD file but the site is not allowing me to).

Are you using the last version of the RStudio IDE ?

I don't see how it could be related to rmarkdown package. Probably some weird thing from the IDE you are using. I'll move this to the RStudio IDE category for visibility

good evening.

Was a solution found for this issue?

Hi, did you eventually find a solution?

No I cannot open it in anyway.
Yes probably a corruption occurred.
The other files are good for now.

No unfortunately. Better to save from time to time the file or use some kind of versioning. Better safe than sorry