--- dff-1.2.0/modules/mailbox/pff/pff_export.cpp.orig	2011-10-04 23:38:45.000000000 +0800
+++ dff-1.2.0/modules/mailbox/pff/pff_export.cpp	2012-05-19 09:34:59.792450004 +0800
@@ -186,7 +186,7 @@
   size_t 		folder_name_size = 0;
   int 			result		 = 0;
 
-  result = libpff_folder_get_name_size(folder, &folder_name_size, &(this->pff_error));
+  result = libpff_folder_get_utf8_name_size(folder, &folder_name_size, &(this->pff_error));
   if (result == 0 || result == -1 || folder_name_size == 0)
   {
     std::ostringstream folderName;
@@ -197,7 +197,7 @@
   else
   {
     folder_name = (uint8_t *) new uint8_t[folder_name_size];
-    result = libpff_folder_get_name(folder, folder_name, folder_name_size, NULL);
+    result = libpff_folder_get_utf8_name(folder, folder_name, folder_name_size, NULL);
     subFolder = new PffNodeFolder(std::string((char *)folder_name), parent, this);
   }
 
@@ -234,7 +234,7 @@
   
   PffNodeFolder* nodeFolder = new PffNodeFolder(messageName.str(), parent, this);
 
-  if (libpff_message_get_transport_headers_size(email, &transport_headers_size, &(this->pff_error)))
+  if (libpff_message_get_utf8_transport_headers_size(email, &transport_headers_size, &(this->pff_error)))
   {
     if (transport_headers_size > 0)
       new PffNodeEmailTransportHeaders("Transport Headers", nodeFolder, this, email, &(this->pff_error), &(this->pff_file), clone);
@@ -297,7 +297,7 @@
        continue;
      }
      if (attachment_type == LIBPFF_ATTACHMENT_TYPE_DATA)
-       libpff_attachment_get_long_filename_size(attachment, &attachment_filename_size,&(this->pff_error));
+       libpff_attachment_get_utf8_long_filename_size(attachment, &attachment_filename_size,&(this->pff_error));
 
      attachment_filename = new uint8_t[attachment_filename_size];
      if (attachment_filename == NULL)
@@ -309,7 +309,7 @@
      std::ostringstream attachmentName;
      if (attachment_type == LIBPFF_ATTACHMENT_TYPE_DATA)
      {
-       if ( libpff_attachment_get_long_filename(attachment, attachment_filename, attachment_filename_size, NULL ) != 1 )
+       if ( libpff_attachment_get_utf8_long_filename(attachment, attachment_filename, attachment_filename_size, NULL ) != 1 )
   	 attachmentName << std::string("Attachment") << attachment_iterator + 1;
        else 
          attachmentName << std::string((char*)attachment_filename);
--- dff-1.2.0/modules/mailbox/pff/pff_node_email_attributes.cpp.orig	2012-05-19 09:56:29.432450001 +0800
+++ dff-1.2.0/modules/mailbox/pff/pff_node_email_attributes.cpp	2012-05-19 09:59:35.751450002 +0800
@@ -164,7 +164,7 @@
   size_t message_transport_headers_size  = 0; 
   uint8_t *entry_string = NULL;
 
-  if (libpff_message_get_transport_headers_size(item, &message_transport_headers_size,
+  if (libpff_message_get_utf8_transport_headers_size(item, &message_transport_headers_size,
 	          				     this->pff_error) != 1)
     return (0);
 
@@ -173,7 +173,7 @@
 
   entry_string =  new uint8_t [message_transport_headers_size];
 
-  if (libpff_message_get_transport_headers(item, entry_string, message_transport_headers_size, this->pff_error ) != 1 )
+  if (libpff_message_get_utf8_transport_headers(item, entry_string, message_transport_headers_size, this->pff_error ) != 1 )
   {
     delete entry_string;
     return (0);
@@ -210,7 +210,7 @@
 		maximum_entry_value_string_size = entry_value_string_size;
 	     }
   	   }
-	   if (libpff_recipients_get_display_name_size(recipients, recipient_iterator, &entry_value_string_size, NULL) == 1)
+	   if (libpff_recipients_get_utf8_display_name_size(recipients, recipient_iterator, &entry_value_string_size, NULL) == 1)
 	   {
 	      if (entry_value_string_size > maximum_entry_value_string_size)
 		maximum_entry_value_string_size = entry_value_string_size;
@@ -357,11 +357,11 @@
   int 				result 				= 0;
 
   maximum_entry_value_string_size = 24;
-  check_maximum_size(libpff_item_get_display_name_size)
-  check_maximum_size(libpff_message_get_conversation_topic_size)
-  check_maximum_size(libpff_message_get_subject_size)
-  check_maximum_size(libpff_message_get_sender_name_size)
-  check_maximum_size(libpff_message_get_sender_email_address_size)
+  check_maximum_size(libpff_item_get_utf8_display_name_size)
+  check_maximum_size(libpff_message_get_utf8_conversation_topic_size)
+  check_maximum_size(libpff_message_get_utf8_subject_size)
+  check_maximum_size(libpff_message_get_utf8_sender_name_size)
+  check_maximum_size(libpff_message_get_utf8_sender_email_address_size)
   if (!(maximum_entry_value_string_size))
     return (0); 
 
@@ -392,11 +392,11 @@
 	  (*attr)["Flags"] = new Variant(flags.str());
   }
 
-  value_string_to_attribute(libpff_item_get_display_name, "Display name")
-  value_string_to_attribute(libpff_message_get_conversation_topic, "Conversation topic") 
-  value_string_to_attribute(libpff_message_get_subject, "Subject")
-  value_string_to_attribute(libpff_message_get_sender_name, "Sender name")
-  value_string_to_attribute(libpff_message_get_sender_email_address, "Sender email address")
+  value_string_to_attribute(libpff_item_get_utf8_display_name, "Display name")
+  value_string_to_attribute(libpff_message_get_utf8_conversation_topic, "Conversation topic") 
+  value_string_to_attribute(libpff_message_get_utf8_subject, "Subject")
+  value_string_to_attribute(libpff_message_get_utf8_sender_name, "Sender name")
+  value_string_to_attribute(libpff_message_get_utf8_sender_email_address, "Sender email address")
 
   if (libpff_message_get_importance(item, &entry_value_32bit, NULL) == 1)
   {
--- dff-1.2.0/modules/mailbox/pff/pff_node_email_attributes.cpp.orig	2012-05-19 10:05:25.315450001 +0800
+++ dff-1.2.0/modules/mailbox/pff/pff_node_email_attributes.cpp	2012-05-19 10:07:50.120450001 +0800
@@ -235,7 +235,7 @@
 	   if (libpff_item_get_entry_value_utf8_string(recipients, recipient_iterator, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, entry_value_string, maximum_entry_value_string_size, 0, NULL) == 1)
 	    attrRecipient["Display Name"] = new Variant(std::string((char *)entry_value_string));
 
-	   if (libpff_recipients_get_display_name(recipients, recipient_iterator, entry_value_string, maximum_entry_value_string_size, NULL) == 1)
+	   if (libpff_recipients_get_utf8_display_name(recipients, recipient_iterator, entry_value_string, maximum_entry_value_string_size, NULL) == 1)
 	     attrRecipient["Recipient display name"] = new Variant(std::string((char*)entry_value_string));
 
 	   if (libpff_item_get_entry_value_utf8_string(recipients, recipient_iterator, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, entry_value_string, maximum_entry_value_string_size, 0, NULL) == 1)
--- dff-1.2.0/modules/mailbox/pff/pff_node_email_transport_headers.cpp.orig	2012-05-19 10:12:24.811450000 +0800
+++ dff-1.2.0/modules/mailbox/pff/pff_node_email_transport_headers.cpp	2012-05-19 10:12:51.297450001 +0800
@@ -20,7 +20,7 @@
 {
   size_t 	headers_size  = 0; 
 
-  if (libpff_message_get_transport_headers_size(mail, &headers_size, this->pff_error) == 1)
+  if (libpff_message_get_utf8_transport_headers_size(mail, &headers_size, this->pff_error) == 1)
   {
     if (headers_size > 0)
        this->setSize(headers_size); 
@@ -45,7 +45,7 @@
   else
     item = *(this->pff_item);	
   entry_string =  new uint8_t [this->size()];
-  if (libpff_message_get_transport_headers(item, entry_string, this->size(), this->pff_error ) != 1 )
+  if (libpff_message_get_utf8_transport_headers(item, entry_string, this->size(), this->pff_error ) != 1 )
   {
     if (this->pff_item == NULL)
       libpff_item_free(&item, this->pff_error);
--- dff-1.2.0/modules/mailbox/pff/libbfio_wrapper.cpp.orig	2012-05-19 10:26:07.420450001 +0800
+++ dff-1.2.0/modules/mailbox/pff/libbfio_wrapper.cpp	2012-05-19 11:59:22.003450003 +0800
@@ -44,13 +44,22 @@
 
     io_handle->access_flags = 0;
     io_handle->file = NULL; 
-    io_handle->parent = parent;	
-    if (libbfio_handle_initialize(handle, (intptr_t*)io_handle,
-        dff_libbfio_file_io_handle_free, dff_libbfio_file_io_handle_clone, dff_libbfio_file_open, 
-	dff_libbfio_file_close, dff_libbfio_file_read, dff_libbfio_file_write, 
-	dff_libbfio_file_seek_offset,  dff_libbfio_file_exists, dff_libbfio_file_is_open, 
-	dff_libbfio_file_get_size, 
-	LIBBFIO_FLAG_IO_HANDLE_MANAGED | LIBBFIO_FLAG_IO_HANDLE_CLONE_BY_FUNCTION, error ) != 1 )
+    io_handle->parent = parent;
+    if (libbfio_handle_initialize(
+        handle,
+        (intptr_t*)io_handle,
+        (int (*)(intptr_t **, libbfio_error_t **)) dff_libbfio_file_io_handle_free,
+        (int (*)(intptr_t **, intptr_t *, libbfio_error_t **)) dff_libbfio_file_io_handle_clone,
+        (int (*)(intptr_t *, int, libbfio_error_t **)) dff_libbfio_file_open,
+	(int (*)(intptr_t *, libbfio_error_t **)) dff_libbfio_file_close,
+	(ssize_t (*)(intptr_t *, uint8_t *, size_t, libbfio_error_t **)) dff_libbfio_file_read,
+	(ssize_t (*)(intptr_t *, const uint8_t *, size_t, libbfio_error_t **)) dff_libbfio_file_write,
+	(off64_t (*)(intptr_t *, off64_t, int, libbfio_error_t **)) dff_libbfio_file_seek_offset,
+	(int (*)(intptr_t *, libbfio_error_t **)) dff_libbfio_file_exists,
+	(int (*)(intptr_t *, libbfio_error_t **)) dff_libbfio_file_is_open,
+	(int (*)(intptr_t *, size64_t *, libbfio_error_t **)) dff_libbfio_file_get_size,
+	LIBBFIO_FLAG_IO_HANDLE_MANAGED | LIBBFIO_FLAG_IO_HANDLE_CLONE_BY_FUNCTION,
+	error ) != 1 )
       {
 	 dff_libbfio_file_io_handle_free((intptr_t *) io_handle, NULL );
 	 return (-1);
