Days ago I've written in vim on macOS 14.4 a markdown file ending with .md extension, as I did many times before with other files having similar purpose & structure.
Yesterday I tried to open the same file in vim on a server running Debian 12.5 and couldn't get the original file content.
When trying analyzing the file with:
file -i $myfile.md
I get:
myfile.md: application/octet-stream; charset=binary
I don't know what happened but I suppose the file got corrupted while transferring it from my workstation to that server.
Reading articles online, it seems as any of my systems is being capable of recognizing what kind
of file it is, even though it has .md extension.\
I tried some of the advices I've found on the web, but I hadn't find any solution that would really fit to my problem, so I hope, if it could get solved, that it could help anyone else.
The only thing I've noticed is that if I write a new file on macOS, it has now the following charset:
new.md: text/plain; charset=us-ascii # file -I on mac
While markdown files written days ago on the same macOS and then transferred to the Debian server:
old.md: text/plain; charset=utf-8 # file -i on debian
Is there any way I could get my content back, using any OS?
Thank you in advance, have a nice day