I unfortunately had a notebook have a syntax error and I would have lost weeks of work. To fix this, I was able to save my old notebook as a .rtf file without any excessive data loss. When I convert this .rtf to .nb by saving the file as .nb, Mathematica is able to open the notebook almost as I left it. The problem is that this results in the loss of all special characters, which I have many of. Is there any way to maintain the special characters while creating the new .nb?

  • 1
    $\begingroup$ Maybe a snippet of the code in question would be useful to point out the problem. Are the special characters not exported at all or as cryptic symbols? In the latter case, a sequence of search and replace operations should help. StringReplace could do that if you can import the file content as string. If the special characters were just ignored when the file was exported, then there is probably no alternative to going through then file manually... $\endgroup$ Mar 7, 2020 at 0:35


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.