Not sure what is going on, but downloaded the latest version of the .DLL and now my NOTES field look like Chinese.
I am doing nothing different than what I did before this new dll, and the previous dll worked just fine.
In the previous .DLL the notes worked just fine, ie, it read the RTF, but as long as you did not have any special formats, it worked great. My notes are basically simple text.
Any suggestions
Hi,
I just came here to post the same issue. I would expect the Notes field to return plain text and not garbage. For MPP it should return the raw RTF, but in the right code page, and for XML it should return the plain text.
Thanks for this code. ANd you are 100% correct. In fact, it used to work just fine before this latest update. I believe the entire point of RTF is that it is plain text, not encoded gibberish.
Your comments combined with using the RTF control clean things up, but what a pain.
thanks again for your quick decoding!
Dim bytes() As Byte = Encoding.Unicode.GetBytes(str)
Dim rtfandnotchinese As String = Encoding.ASCII.GetString(bytes)
Dim rtf As New RichTextBox
rtf.Rtf = rtfandnotchinese
Return rtf.Text
Hi,
Thank you a lot for detailed posts!!!
- We don’t use any encoding when read the Notes data, it is just the data as it is in MPP file.
- We are planning to add additional properties like NotesText and NotesRTF where the plain text can be stored, but I can not share the exact implementation date with you right now.
Unfortunately, different versions of MS Project interpret the Notes data by different way. I have used the code below and test data in attachment. MS Project 2003 can open the Result.xml file and reads Task1 notes by right way (see second screen shot) including formats while some versions of MS Project 2007 read it as garbage. You can check the data in the resulting files by yourselves.
I have used Aspose.Tasks 2.2.0 version from September 2009.
using System;
using System.IO;
using System.Collections.Generic;
using System.Text;
using Aspose.Tasks;
using System.Reflection;
namespace TestOldNotes
{
class Program
{
static void Main(string[] args)
{
ProjectReader reader = new ProjectReader();
ProjectWriter writer = new ProjectWriter();
Project project;
using (FileStream rfs = new FileStream("TestNotesProject.mpp", FileMode.Open, FileAccess.Read))
{
project = reader.Read(rfs);
}
using (FileStream wfs1 = new FileStream("Result.xml", FileMode.Create, FileAccess.Write))
{
writer.Write(project, wfs1, TasksDataFormat.XML);
}
Task task1 = (Task)project.RootTask.Children[0];
string note = task1.Notes;
string rtf = Encoding.ASCII.GetString(Encoding.Unicode.GetBytes(note));
task1.Notes = rtf;
using (FileStream wfs2 = new FileStream("ResultUpdated.xml", FileMode.Create, FileAccess.Write))
{
writer.Write(project, wfs2, TasksDataFormat.XML);
}
Console.WriteLine(typeof(Project).Assembly.FullName);
Console.WriteLine("Note:");
Console.WriteLine(note);
Console.ReadLine();
}
}
}
The issues you have found earlier (filed as 16279) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
Hi,
The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.