Add support of encodings for MPX files (C# .NET)

Hi, I’ve been working with Aspose.Task for .Net.

I want to read the mpx file encoded with iso-8859-1.
But, Aspose.Tasks.LoadOptions class don’t have encoding property…

Could anyone help me?
Thanks

@soohee,

I have observed your requirements and regret to inform that this is not supported yet. A ticket with ID TASKSNET-3120 has been created as in our issue tracking system as a new feature request. We will look into the possibility of implementation of the requested feature. This thread has been associated with this new feature request, so that you can be automatically notified as soon as this issue is resolved.

@soohee Hello!

You can use the next approach:

using (StreamReader streamReader = new StreamReader("Project.mpx", System.Text.Encoding.GetEncoding("ISO-8859-1")))
{
    var project = new Project(streamReader.BaseStream);
}

Hello!!

I tried your solution… but, text is still broken.

my code here…

 // MPX requires iso-8859-1 to ANSI encoding process to recognize Korean 
 var name = Encoding.GetEncoding("iso-8859-1").GetBytes(child.Get(Tsk.Name));
 var taskName = Encoding.GetEncoding("ks_c_5601-1987").GetString(name);

and attached a file.
mpx sample file.zip (1.7 KB)

Thanks…

@soohee,

Thank you for sharing the information. We will share the feedback with you as soon as possible.

The issues you have found earlier (filed as TASKSNET-3120) have been fixed in this update.