I am creating package

using System;

using System.Collections.Generic;

using System.Text;

using System.IO.Packaging;

using System.IO;

using System.Xml.Serialization;

namespace Sample {

class Program {

static void Main(string[] args) {

using (Package package = Package.Open(_filePath, FileMode.Create)) {

Uri uriPart = PackUriHelper.CreatePartUri(new Uri(

"/ .html", UriKind.Relative));

// mime type

string partType = "text/html";

CompressionOption compressionOption = CompressionOption.Normal;

string packageRelationshipType = "packageRelationship";

PackagePart part = package.CreatePart(uriPart, partType, compressionOption);

using (FileStream stream = File.OpenRead(_toPack)) {

CopyStream(stream, part.GetStream());





Package is created perfectly but there is a problem with file name, looks like all chars that are > 127, becomes unreadable in package. Instead of I see %D0%90%D0%91%D0%92.

Is there any workaround

Re: Visual C# General OPC, PackUriHelper.CreatePartUri


Why do you want the extended character in the first place

Re: Visual C# General OPC, PackUriHelper.CreatePartUri


Because in my application user can set names of parts, and some times they use extended characters.