ironfede / openmcdf

Microsoft Compound File .net component - pure C# - netstandard 2.0
Mozilla Public License 2.0
302 stars 73 forks source link

Some file's name is missing #9

Closed Zeki-Gursoy closed 7 years ago

Zeki-Gursoy commented 7 years ago

Hi Federico.

I am using the latest version.But Some file's name is missing.

On 2.0: For example: [1]CompObj Only show charcode 1 and CompObj For example: [3]VBFrame Only show charcode 3 and VBFrame

On 2.1: For example: [1]CompObj Only show [] and CompObj For example: [3]VBFrame Only show [] and VBFrame

File name must be [1]CompObj but dont show/get file name Note : It is a Excel (xls) file!

Screenshots are attached.

Thanks in advance

resim

resim

ironfede commented 7 years ago

Anemos, I'm taking a look at OpenMcdf behaviour for issue you opened. Openmcdf doesn't show the string "[5]" or "[1]" because imho that could be a misleading information.

Unicode character \u0005 is shown by 7zip in a way that make it recognizable at a first gance but this character is the control character ENQuiry (ALT+05) and it is not actually printable (this is why a placeholder character is shown in Structured Storage eXplorer).
If you use OpendMcdf API, you CAN use character value even if it is not printable.

Finally, I can show you why this 7zip choice can be misleading: What if we have two streams, one with the non-printable character that is "interpreted" as "[5]" and one with 3 printable characters "[5]" in the same position?

image

Thank You for your report, it gave me the occasion to explain this design choice. Best Regards, Federico

Zeki-Gursoy commented 7 years ago

You were right. When all binary stream of xls file without the square brackets I saved "xls" with explorer, file is opened succesfully. "[5]" or "[3]" added extra by 7-zip and unnecessary. Thanks....