Free Support Forum - aspose.com

Encoding setting problem


#1

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


#2

@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.


#3

@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);
}

#5

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…


#6

@soohee,

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


#7

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