MapiAttachment object is not giving attachments having Japanese names . It’s giving asci weird characters in place of Japanese name of the attachment(s). E.g. AE症例報告_20190903.zip attachment name is coming as AE$BINcJs9p(B_20190903.zip
Below is my snippet:
////////////////////
attachments = mapiMsg.getAttachments();
for (int i = 0; i < attachments.size(); i++)
{
attachment = attachments.get_Item(i);
logger.debug ( "Inside attachmentFileNameWithPathUsingAspose HERE MapiPropertyTag.PR_ATTACHMENT_FLAGS ");
if ( attachment.getMyProperties().containsKey(MapiPropertyTag.PR_ATTACHMENT_FLAGS) )
{
logger.debug ( "Inside attachmentFileNameWithPathUsingAspose FOUND MapiPropertyTag.PR_ATTACHMENT_FLAGS " );
//+ attachment.getMyProperties().getPropertyLong( MapiPropertyTag.PR_ATTACHMENT_FLAGS ).getInt32()
mapiProp = attachment.getMyProperties().get_Item( MapiPropertyTag.PR_ATTACHMENT_FLAGS) ;
if ( mapiProp != null )
{
try
{
logger.debug ("Inside attachmentFileNameWithPathUsingAspose value was: " + mapiProp.getInt32( ) ) ;
}
catch(Exception mapiExp)
{
logger.error (" mapiexception was: " + mapiExp.getMessage() ) ;
try
{
logger.debug (" after exception value was: " + mapiProp.toString() ) ;
}
catch(Exception eMappi)
{
logger.error (" eMappi was: " + eMappi.getMessage() ) ;
}
}
}
}
attachDispName = attachment.getDisplayName() ;
logger.debug("inside attachmentFileNameWithPathUsingAspose attachment @ " + i + " Display-name was-> " + attachDispName );
logger.debug("inside attachmentFileNameWithPathUsingAspose attachment @ " + i + " getMimeTag was-> " + attachment.getMimeTag());
logger.debug("inside attachmentFileNameWithPathUsingAspose attachment @ " + i + " FileName- was-> " + attachment.getFileName());
logger.debug("inside attachmentFileNameWithPathUsingAspose attachment @ " + i + " getLongFileName was-> " + attachment.getLongFileName() );
logger.debug("inside attachmentFileNameWithPathUsingAspose attachment @ " + i + " getExtension was-> " + attachment.getExtension() );
…
…
/////////////////////////////////////