[Mono-dev] Problem with PackagePart URI containing spaces
Alan McGovern
alan.mcgovern at gmail.com
Mon Nov 23 08:44:56 EST 2009
Hi,
Thanks for the bug report. Would you be able to file the issue on bugzilla
(with the testcase) and assign it to me (amcgovern at novell.com). That way I
can fix it and have the paper trail to verify the fix works.
If you come across any other issues, just assign them directly to me on
bugzilla.
Thanks,
Alan.
On Mon, Nov 23, 2009 at 11:53 AM, mhartmann <mhartmann at vr-web.de> wrote:
>
> Hi,
>
> I'm trying to read packages that were created with System.IO.Packaging on a
> Windows machine using .NET.
>
> It seems that that there is a problem with PackageParts that contain spaces
> in the specified package URI.
>
> Using the following code produces different results on .NET / Mono:
>
> string fileName = "Test.zip";
> Uri uri = PackUriHelper.CreatePartUri(new Uri("/My Folder/Test.txt",
> UriKind.Relative));
>
> using (Package package = Package.Open(fileName, FileMode.Create))
> {
> PackagePart part = package.CreatePart(uri,
> System.Net.Mime.MediaTypeNames.Text.Plain);
> using (StreamWriter sw = new StreamWriter(part.GetStream()))
> {
> sw.WriteLine("Hello World");
> }
> }
>
> On Linux using Mono the ZIP file contains a folder "My Folder", but with
> Windows and .NET the name of the folder is escaped ("My%20Folder").
>
> Best regards
> Martin
> --
> View this message in context:
> http://old.nabble.com/Problem-with-PackagePart-URI-containing-spaces-tp26476712p26476712.html
> Sent from the Mono - Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20091123/cdc80584/attachment.html
More information about the Mono-devel-list
mailing list