File encoding strategy question

Dennis Benzinger Dennis.Benzinger at gmx.net
Sun May 21 08:46:03 EDT 2006


Andrew Robert schrieb:
> Hi everyone,
> 
> I am in the process of creating a file transmit/receiver program using
> MQSeries.
> 
> The way it works is through creation of an XML message.
> 
> Elements within the XML message contain things such as file name, size,
> and the file contents.
> 
> The file contents are encoded, currently using Base64, for support of
> both binary and text data.
> 
> This works great but there is a small rub to the problem.
> 
> I would like to be able to view the contents of the file if it is text
> while still maintaining the ability to transmit binary data.
> 
> Does anyone know of an encoding format that would make this possible?
> [...]

Yes. You could use the Quoted-Printable encoding. See RFC 2045
Multipurpose Internet Mail Extensions (MIME) Part One: Format of
Internet Message Bodies <ftp://ftp.rfc-editor.org/in-notes/rfc2045.txt>


Dennis



More information about the Python-list mailing list