NSFItemSetText not working as expected with accented Portuguese characters

I think that there is a problem with NSFItemSetText function in the API involving the Subject field.

I am unable to post all of my code, but here is the portion where I am adding the Subject. I am sending the same string into both the Subject and the Body.

STATUS status = 0;

  string strData  =  "À Á Â Ã É Ê Í Ó Ô Õ Ú Ü à á â ã é ê í ó ô õ ú ü Ç ç « » €";

  long lSize = strdata.size();

  long lLength = strData.length();

  if( status = NSFItemSetText( Handle, "Subject", strData.c_str(), lLength )

  {

          //Handle error message

  }

When the mail item is sent, I receive this in Notes.

Subject: └ ┴ ┬ ├ ╔ ╩ ═ Ë È ı ┌ ▄ Ó ß Ô Ò Ú Û Ý ¾ ¶ § · ³ Ã þ ½ ╗ Ç

Body: À Á Â Ã É Ê Í Ó Ô Õ Ú Ü à á â ã é ê í ó ô õ ú ü Ç ç « » €

As you can see, the subject is all jumbled and the body is correct. Yet I am going through the same code paths for each (the only difference is that I am calling NSFItemSetText with either “Subject” or “Body” for the second parameter.

Please let me know if I am missing something or if this is a known issue. I had not seen this anywhere in the API documentation and I searched online to see if this had been fixed somewhere else.

Thank you,

tony


Here is my test from within Notes, which does not change the Subject’s characters

From within Notes, open a new memo.

To: send to yourself

Subject: À Á Â Ã É Ê Í Ó Ô Õ Ú Ü à á â ã é ê í ó ô õ ú ü Ç ç « » €

Body: À Á Â Ã É Ê Í Ó Ô Õ Ú Ü à á â ã é ê í ó ô õ ú ü Ç ç « » €