How to convert Zarnegar files to RTF, Word, or HTML formats

تبدیلِ فایل‏هایِ زَرنِگار به وُرد

By Eric Bright
Update Mar 2023: rephrased a sentence
Update July 23, 2021: mentioned the Zarnegar to Word conversion possibility, corrected typos
Update Mar 05, 2021: added a new tool
Update on Feb 05, 2020: contents & link update
Update on May 19, 2018: link update)
Update on Dec 28, 2017

Solution

1- Download Zar2RTF Converter from here:

Zar2RTF and Zar2HTML

2- Use the software to convert your Zarnegar files to RTF or HTML. Once you created one of those files, saving them as a Word document under .docx or .odt will be trivial and can easily be done with LibreOffice.

3- The converter keeps the line-breaks of the original Zarnegar file by using soft return in Word. It can be edited out with finding and replacing all instances of ^l with blank (^l is a regular expression. So, make sure that the option for “Regular expressions” is checked in your find-and-replace dialogue box. Use \n in LibreOffice instead).

4- The converter also adds manual page-breaks at the end of each page to make it look like what Zarnegar would produce. Find all instances of ^m and replace them with blank (use \m in LibreOffice instead).

5- Tables will not be converted as such. Only the contents of each table cell will be converted. Also, formulae will be lost. Almost everything else will be converted neatly.

6- If, for whatever reason, you could not pull it off, send your file to me and I will try to convert it to RTF for you, although I cannot guarantee you anything.

Background story

When SinaSoft made Zarnegar in Iran back in the 1990s, there were no better word processors around for Persian authors. It was already impressive to be able to type in Persian. No one cared to save their documents in a future-proof format; it was not a thing back then. Almost everything used to be experimental. Everything was the first attempts to do anything. All software were buggy. The quality of them, based on today’s standards, was pre-alpha release. That means they were crappy.

As such, there were no standard for document file formats during 80s and 90s. No one even knew what they were doing with each format. Every company made their own proprietary file formats basically because most of them never thought of anything else. Most companies didn’t even think about standards and incompatibilities. As long as it was “IBM compatible” and it could run under MS-DOS, it was considered to be good enough.

There were not many software that could support the Persian script. Zarnegar was one of the handful. It also was the best.

It was not until sometime between 1995 and 98 when MS Word started to support right-to-left scripts such as Persian and Arabic. As soon as that happened, authors as well as publishing houses in Iran moved to MS Office in droves. Everyone was rushing to move over to MS Word and get rid of Zarnegar. Those who could get their hands on a copy of MS Office would have done so without ever looking back. Those who had books, articles, and any other text written in Zarnegar attempted, and failed, to convert their files to MS Word file formats.

Soon everyone started to realize how impossible such a conversion was. You couldn’t convert your Zarnegar files to MS Word files. It could not be done. You could not copy the text from it and paste it into Word. Zarnegar could only run under MS-DOS, whereas Word 95 and 98 were Windows programs. Copy/paste would not have worked between these two environments (that is if you had your MS-DOS box inside a virtual machine on a Windows box. I’m not even sure if virtual machines were around back then, yet).

You, as an author or a publishing house or anyone stuck with Zarnegar files, had only one option: To retype your works from scratch in Word. And, for the most part, that was that. So, those who could afford the retype, did it as fast as they could. Those who couldn’t, got stuck with the incompatible and practically useless Zarnegar files.

SinaSoft wrote a converter in year 2000. In later years, a few other companies started to support conversion of Zarnegar files to standard document formats in their software. “Standard document formats” is an overstatement in this context. RTF and DOC were all you could get and these two formats are hardy “standard.” But again, they were hugely better and more useful than anything that Zarnegar could produce.

However, there has been always a huge problem with all those conversion tools: They have been prohibitively expensive and not available to anyone who is stuck with the useless file format that Zarnegar used. This is ridiculous to the extreme and totally unacceptable.

If you wanted to convert your Zarnegar files to anything remotely useful, you either had to buy Ghalam or Parnian Pro made by different companies, or another junk from SinaSoft called Zar2Image for about $140 CAD (as of August 8, 2014). All that $140 could do was to give back your hard work that had been held hostage in a Zarnegar file.

Had you been outraged by this lack of legitimate and expected support for a free conversion of documents you produced and own from a useless format to something you could work on, then you probably would have started to search for alternative solutions. Unfortunately, searching the Internet would not bring you many hints. Most people faced the same challenge and received almost the same useless advice. Most forums where you could find anything on converting Zarnegar files to Word documents were, and still are, invariably useless. They offer nothing more than referring you to the two aforementioned software, which, in my opinion, is nonsense.

I have searched both the English and Persian pages and forums for years and years with zero useful results. That was until early August 2014 when I stumbled upon a Persian blog post at (all links mentioned in that forum are now dead):

تبدیل فایل‏های زرنگار به ورد

This is one of the only two viable solutions for the problem I could find so far.

In March 2021, when I was editing this article for accuracy and link-updates, I also stumbled upon a new tool on GitHub called Python Zarnegar Converter:

Converter for Zarnegar Encoding and File Format to Unicode Text Files

I haven’t used that tool myself, so I cannot tell you how it might work. If you happened to know how to use it, or used it in the past, please let me know about it and I will update this article to reflect those findings.

In case you found a better solution on the Internet (it must be free of charge), please let me know and I will update this article to add the new converter.

I hope this article helped you save tens of hours of extra work and saved you from retyping your whole work or sifting through the Internet in hope of finding a workable solution.

Leave a Reply

Your email address will not be published. Required fields are marked *