Hi,
I was trying to encode a MS word file containing some text and a jpeg file to binhex. It encode to hqx, when i try to open it in Mac OS, it fails. It ask to choose an application to open it. This is when i do not set the HeaderResourceForkLength. If I set the HeaderResourceForkLength to and HeaderDataForkLength to size of the file as specified in the sample code, it fails to encode propely. The encoded hqx file contains a folder with some XML files and other files and folder.
What it behave such way for document with an image. It works properly for a word document without any image or any other resource, just text.
Do i need to set some thing else in the Encode formatting class of Binhex? If yes, then what I am missing here and how can i supply those values to formatting object.
Note: I have work exactly as specified in the sample code.
I supplied
encodingFormat.IncludeHeaderFooter = true;
encodingFormat.EndOfLineType = XceedBinaryEncodingLib.EXBEndOfLineType.bltCrLf;
encodingFormat.HeaderResourceForkLength = 0;
encodingFormat.HeaderDataForkLength = ( int )(new FileInfo( sourceFileName )).Length;
encodingFormat.MaxLineLength = 64;
Regards
Nishant