Link to home
Start Free TrialLog in
Avatar of PeterDelphin
PeterDelphin

asked on

Smallest possible and most compatible source code for an empty RTF file?

I need the source-code for a MINIMAL-SIZE empty RTF file.

So I opened Microsoft WordPad and saved the empty text to an RTF file which gave me this result:

{\rtf1\ansi\ansicpg1252\deff0\deflang3079{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang7\f0\fs22\par
}

Open in new window


But I suspect that there is still unnecessary information in this source-code.

I also suspect that the code "\rtf1\ansi\ansicpg1252" could lead to incompatibilities with some languages?

Also, the generator information seems superfluous to me.

So what is the smallest possible and most compatible source code for an empty RTF file?

[Unfortunately, there is no approved RTF topic to chose.]
Avatar of Geert G
Geert G
Flag of Belgium image

smallest ?
a completely empty file with an .rtf extension

any reader will display that correctly ... in other words, any reader will display "nothing"
Avatar of PeterDelphin
PeterDelphin

ASKER

You mean a zero-length (0 bytes) file? This unfortunately causes problems with a specific software. That's why I asked for the Smallest possible and most compatible source code for an empty RTF file.
what software ?
this is the shortest:

{\rtf1}

Open in new window


in windows, right click in a folder, new, richt text format file
Unfortunately even this ("{\rtf1}") causes problems with the mentioned software.

But then why the RTF source-code I mentioned in my question does not make any problems with that software? The empty RTF source should be as compatible as possible.

(I will not mention the name of the software as it is a well-known company).
why wouldn't you mention the software ?
you asked for compatibilty


just same as asking this question:
what is the difference between an apple
ASKER CERTIFIED SOLUTION
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
assuming you aren't going to open that on a mac or ..., yes
what does your "un well-known" software produce as empty file ?
Geert Gruwez, can you please tell me why I shouldn't that open on a Mac?