Index: src/Utils/UriUtils.cs
===================================================================
--- src/Utils/UriUtils.cs	(Revision 4714)
+++ src/Utils/UriUtils.cs	(Arbeitskopie)
@@ -94,6 +94,25 @@
 			}
 			
 			return s.ToString ();
-		}	
+		}
+		// NOTE: Copied from dbus-sharp/Address.cs: Unescape, which isn't public
+		// This is the reverse function of EscapeString
+		public static string UnescapeString (string str)
+		{
+			if (str == null)
+				return String.Empty;
+
+			StringBuilder sb = new StringBuilder ();
+			int len = str.Length;
+			int i = 0;
+			while (i != len) {
+				if (Uri.IsHexEncoding (str, i))
+					sb.Append (Uri.HexUnescape (str, ref i));
+				else
+					sb.Append (str[i++]);
+			}
+
+			return sb.ToString ();
+		}
 	}
 }
Index: extensions/Exporters/PicasaWebExport/PicasaWebExport.cs
===================================================================
--- extensions/Exporters/PicasaWebExport/PicasaWebExport.cs	(Revision 4714)
+++ extensions/Exporters/PicasaWebExport/PicasaWebExport.cs	(Arbeitskopie)
@@ -654,12 +654,13 @@
 			while (photo_index < items.Length) {
 				try {
 					IBrowsableItem item = items[photo_index];
+					string prettyname = UriUtils.UnescapeString (item.Name);
 
 					FileInfo file_info;
 					Console.WriteLine ("uploading {0}", photo_index);
 
 					progress_dialog.Message = String.Format (Catalog.GetString ("Uploading picture \"{0}\" ({1} of {2})"),
-										 item.Name, photo_index+1, items.Length);
+										 prettyname, photo_index+1, items.Length);
 					photo_index++;
 
 					PicasaPicture picture;
@@ -672,7 +673,7 @@
 						else
 							approx_size = sent_bytes * items.Length / (photo_index - 1);
 
-						picture = album.UploadPicture (request.Current.LocalPath, Path.ChangeExtension (item.Name, "jpg"), item.Description);
+						picture = album.UploadPicture (request.Current.LocalPath, Path.ChangeExtension (prettyname, "jpg"), item.Description);
 						sent_bytes += file_info.Length;
 					}
 					if (Core.Database != null && item is Photo)
Index: extensions/Exporters/PicasaWebExport/PicasaWebExport.addin.xml
===================================================================
--- extensions/Exporters/PicasaWebExport/PicasaWebExport.addin.xml	(Revision 4714)
+++ extensions/Exporters/PicasaWebExport/PicasaWebExport.addin.xml	(Arbeitskopie)
@@ -1,5 +1,5 @@
 <Addin namespace="FSpot"
-	version="0.5.0.1"
+	version="0.5.0.2"
 	name="PicasaWeb Export"
 	description="This extension allows you to export your photos to PicasaWeb."
 	author="F-Spot team"
Index: extensions/Exporters/GalleryExport/GalleryRemote.cs
===================================================================
--- extensions/Exporters/GalleryExport/GalleryRemote.cs	(Revision 4714)
+++ extensions/Exporters/GalleryExport/GalleryRemote.cs	(Arbeitskopie)
@@ -7,6 +7,7 @@
 using System.Web;
 using Mono.Unix;
 using FSpot;
+using FSpot.Utils;
 using FSpot.UI.Dialog;
 
 /* These classes are based off the documentation at
@@ -96,7 +97,7 @@
 			return gallery.AddItem (this,
 					 path,
 					 Path.GetFileName (item.DefaultVersionUri.LocalPath),
-					 item.Name,
+					 UriUtils.UnescapeString (item.Name),
 					 item.Description,
 					 true);
 		}
Index: extensions/Exporters/GalleryExport/GalleryExport.cs
===================================================================
--- extensions/Exporters/GalleryExport/GalleryExport.cs	(Revision 4714)
+++ extensions/Exporters/GalleryExport/GalleryExport.cs	(Arbeitskopie)
@@ -770,19 +770,17 @@
 				else if (rotate)
 					filters.Add (new OrientationFilter ());
 
-
 				while (photo_index < items.Length) {
 					IBrowsableItem item = items [photo_index];
 
 					System.Console.WriteLine ("uploading {0}", photo_index);
 
-					progress_dialog.Message = System.String.Format (Catalog.GetString ("Uploading picture \"{0}\""), item.Name);
+					progress_dialog.Message = System.String.Format (Catalog.GetString ("Uploading picture \"{0}\""), UriUtils.UnescapeString (item.Name));
 					progress_dialog.Fraction = photo_index / (double) items.Length;
 					photo_index++;
 
 					progress_dialog.ProgressText = System.String.Format (Catalog.GetString ("{0} of {1}"), photo_index, items.Length);
 
-
 					FilterRequest req = new FilterRequest (item.DefaultVersionUri);
 
 					filters.Convert (req);
Index: extensions/Exporters/GalleryExport/GalleryExport.addin.xml
===================================================================
--- extensions/Exporters/GalleryExport/GalleryExport.addin.xml	(Revision 4714)
+++ extensions/Exporters/GalleryExport/GalleryExport.addin.xml	(Arbeitskopie)
@@ -1,5 +1,5 @@
 <Addin namespace="FSpot"
-	version="0.5.0.0"
+	version="0.5.0.1"
 	name="Gallery Export"
 	description="This extension allows you to export your photos to PHP Gallery (http://gallery.menalto.com)."
 	author="F-Spot team"
Index: extensions/Exporters/ZipExport/ZipExport.addin.xml
===================================================================
--- extensions/Exporters/ZipExport/ZipExport.addin.xml	(Revision 4714)
+++ extensions/Exporters/ZipExport/ZipExport.addin.xml	(Arbeitskopie)
@@ -1,6 +1,6 @@
 <Addin namespace="FSpot"
 	id="ZipExport"
-	version="0.5.0.0"
+	version="0.5.0.1"
 	name="Zip export"
 	description="Simple export to Zip file"
 	author="Lorenzo Milesi"
Index: extensions/Exporters/ZipExport/ZipExport.cs
===================================================================
--- extensions/Exporters/ZipExport/ZipExport.cs	(Revision 4714)
+++ extensions/Exporters/ZipExport/ZipExport.cs	(Arbeitskopie)
@@ -24,6 +24,7 @@
 using ICSharpCode.SharpZipLib.Checksums;
 using ICSharpCode.SharpZipLib.Zip;
 using ICSharpCode.SharpZipLib.GZip;
+using FSpot.Utils;
 
 namespace ZipExport {
 	public class Zip : IExporter {
@@ -104,7 +105,8 @@
 
 			//Pack up
 			for (int i = 0; i < photos.Length; i ++) {
-				if (progress_dialog.Update (String.Format (Catalog.GetString ("Preparing photo \"{0}\""), photos[i].Name))) {
+				string prettyname = UriUtils.UnescapeString (photos [i].Name);
+				if (progress_dialog.Update (String.Format (Catalog.GetString ("Preparing photo \"{0}\""), prettyname))) {
 					progress_dialog.Destroy ();
 					return;
 				}
@@ -123,7 +125,7 @@
 
 				byte [] buffer = new byte [fs.Length];
 				fs.Read (buffer, 0, buffer.Length);
-				ZipEntry entry = new ZipEntry (photos [i].Name);
+				ZipEntry entry = new ZipEntry (prettyname);
 
 				entry.DateTime = DateTime.Now;
 
Index: extensions/Exporters/SmugMugExport/SmugMugExport.addin.xml
===================================================================
--- extensions/Exporters/SmugMugExport/SmugMugExport.addin.xml	(Revision 4714)
+++ extensions/Exporters/SmugMugExport/SmugMugExport.addin.xml	(Arbeitskopie)
@@ -1,5 +1,5 @@
 <Addin namespace="FSpot"
-	version="0.5.0.0"
+	version="0.5.0.1"
 	name="SmugMug Export"
 	description="This extension allows you to export your photos to SmugMug."
 	author="F-Spot team"
Index: extensions/Exporters/SmugMugExport/SmugMugExport.cs
===================================================================
--- extensions/Exporters/SmugMugExport/SmugMugExport.cs	(Revision 4714)
+++ extensions/Exporters/SmugMugExport/SmugMugExport.cs	(Arbeitskopie)
@@ -558,12 +558,13 @@
 			while (photo_index < items.Length) {
 				try {
 					IBrowsableItem item = items[photo_index];
+					string prettyname = UriUtils.UnescapeString (item.Name);
 
 					FileInfo file_info;
 					Console.WriteLine ("uploading {0}", photo_index);
 
 					progress_dialog.Message = String.Format (Catalog.GetString ("Uploading picture \"{0}\" ({1} of {2})"),
-										 item.Name, photo_index+1, items.Length);
+										 prettyname, photo_index+1, items.Length);
 					progress_dialog.ProgressText = string.Empty;
 					progress_dialog.Fraction = ((photo_index) / (double) items.Length);
 					photo_index++;
Index: extensions/Exporters/ChangeLog
===================================================================
--- extensions/Exporters/ChangeLog	(Revision 4714)
+++ extensions/Exporters/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,15 @@
+2009-02-22  Alexander Skwar  <alexander@skwar.name>
+
+        * CDExport/CDExport.cs,
+        * FacebookExport/FacebookExport.cs,
+        * FlickrExport/FlickrExport.cs,
+        * FlickrExport/FlickrRemote.cs,
+        * GalleryExport/GalleryExport.cs,
+        * GalleryExport/GalleryRemote.cs,
+        * PicasaWebExport/PicasaWebExport.cs,
+        * SmugMugExport/SmugMugExport.cs,
+        * ZipExport/ZipExport.cs: Use the unescaped picture name -> bgo #569460
+
 2009-02-16  Lorenzo Milesi  <maxxer@yetopen.it>
 
 	* PicasaWebExport/PicasaWebExport.cs: make some strings
Index: extensions/Exporters/CDExport/CDExport.addin.xml
===================================================================
--- extensions/Exporters/CDExport/CDExport.addin.xml	(Revision 4714)
+++ extensions/Exporters/CDExport/CDExport.addin.xml	(Arbeitskopie)
@@ -1,5 +1,5 @@
 <Addin namespace="FSpot"
-	version="0.5.0.0"
+	version="0.5.0.1"
 	name="CD Export"
 	description="This extension allows you to burn your photos to CD."
 	author="F-Spot team"
Index: extensions/Exporters/CDExport/CDExport.cs
===================================================================
--- extensions/Exporters/CDExport/CDExport.cs	(Revision 4714)
+++ extensions/Exporters/CDExport/CDExport.cs	(Arbeitskopie)
@@ -152,14 +152,16 @@
 
 				//FIXME need to implement the uniquename as a filter
 					using (FilterRequest request = new FilterRequest (photo.DefaultVersionUri)) {
+						string prettyname = UriUtils.UnescapeString (photo.Name);
+
 						if (rotate)
 							new OrientationFilter ().Convert (request);
 
 						GLib.File source = FileFactory.NewForUri (request.Current.ToString ());
-						GLib.File target = UniqueName (dest, photo.Name);
+						GLib.File target = UniqueName (dest, prettyname);
 						FileProgressCallback cb = Progress;
 
-						progress_dialog.Message = System.String.Format (Catalog.GetString ("Transferring picture \"{0}\" To CD"), photo.Name);
+						progress_dialog.Message = System.String.Format (Catalog.GetString ("Transferring picture \"{0}\" To CD"), prettyname);
 						progress_dialog.Fraction = photo_index / (double) selection.Count;
 						progress_dialog.ProgressText = System.String.Format (Catalog.GetString ("{0} of {1}"),
 											     photo_index, selection.Count);
Index: extensions/Exporters/FacebookExport/FacebookExport.cs
===================================================================
--- extensions/Exporters/FacebookExport/FacebookExport.cs	(Revision 4714)
+++ extensions/Exporters/FacebookExport/FacebookExport.cs	(Arbeitskopie)
@@ -525,7 +525,7 @@
 					FileInfo file_info;
 					Console.WriteLine ("uploading {0}", i);
 
-					progress_dialog.Message = String.Format (Catalog.GetString ("Uploading picture \"{0}\" ({1} of {2})"), item.Name, i + 1, items.Length);
+					progress_dialog.Message = String.Format (Catalog.GetString ("Uploading picture \"{0}\" ({1} of {2})"), UriUtils.UnescapeString (item.Name), i + 1, items.Length);
 					progress_dialog.ProgressText = string.Empty;
 					progress_dialog.Fraction = i / (double) items.Length;
 
Index: extensions/Exporters/FacebookExport/FacebookExport.addin.xml
===================================================================
--- extensions/Exporters/FacebookExport/FacebookExport.addin.xml	(Revision 4714)
+++ extensions/Exporters/FacebookExport/FacebookExport.addin.xml	(Arbeitskopie)
@@ -1,6 +1,6 @@
 <Addin 	namespace="FSpot"
 	id="FacebookExport"
-	version="0.5.0.1"
+	version="0.5.0.2"
 	name="FacebookExport"
 	description="Export pictures to facebook"
 	author="George Talusan"
Index: extensions/Exporters/FlickrExport/FlickrExport.cs
===================================================================
--- extensions/Exporters/FlickrExport/FlickrExport.cs	(Revision 4714)
+++ extensions/Exporters/FlickrExport/FlickrExport.cs	(Arbeitskopie)
@@ -341,7 +341,7 @@
 				try {
 					IBrowsableItem photo = photos [index];
 					progress_dialog.Message = System.String.Format (
-                                                Catalog.GetString ("Uploading picture \"{0}\""), photo.Name);
+                                                Catalog.GetString ("Uploading picture \"{0}\""), UriUtils.UnescapeString (photo.Name));
 
 					progress_dialog.Fraction = photo_index / (double)selection.Count;
 					photo_index++;
Index: extensions/Exporters/FlickrExport/FlickrExport.addin.xml
===================================================================
--- extensions/Exporters/FlickrExport/FlickrExport.addin.xml	(Revision 4714)
+++ extensions/Exporters/FlickrExport/FlickrExport.addin.xml	(Arbeitskopie)
@@ -1,5 +1,5 @@
 <Addin namespace="FSpot"
-	version="0.5.0.0"
+	version="0.5.0.1"
 	name="Flickr Export"
 	description="This extension allows you to export your photos to Flickr and 23hq."
 	author="F-Spot team"
Index: extensions/Exporters/FlickrExport/FlickrRemote.cs
===================================================================
--- extensions/Exporters/FlickrExport/FlickrRemote.cs	(Revision 4714)
+++ extensions/Exporters/FlickrExport/FlickrRemote.cs	(Arbeitskopie)
@@ -178,7 +178,7 @@
 				}
 				try {
 					string photoid =
-						flickr.UploadPicture (path, photo.Name, photo.Description, tags, is_public, is_family, is_friend);
+						flickr.UploadPicture (path, UriUtils.UnescapeString (photo.Name), photo.Description, tags, is_public, is_family, is_friend);
 					return photoid;
 				} catch (FlickrNet.FlickrException ex) {
 					Console.WriteLine ("Problems uploading picture: " + ex.ToString());
Index: ChangeLog
===================================================================
--- ChangeLog	(Revision 4714)
+++ ChangeLog	(Arbeitskopie)
@@ -1,3 +1,9 @@
+2009-02-22  Alexander Skwar  <alexander@skwar.name>
+
+        * src/Utils/UriUtils.cs: Add method "UnescapeString", which should
+	  be used for decoding the filename as it is stored in the photos.db
+	  database. bgo #569460
+
 2009-02-12  Stephane Delcroix  <sdelcroix@novell.com>
 
 	* src/Imaging/PngFile.cs: move the tests to Test/
Index: TODO
===================================================================
--- TODO	(Revision 4714)
+++ TODO	(Arbeitskopie)
@@ -96,6 +96,11 @@
         up.
 
 Export:
+      * When exporting pictures, where the filename uses non-ASCII
+        characters, the filename isn't properly decoded. So if a filename
+        like "Cédric" is stored in the database, in the database we'll
+        find "C%C3%A9dric" and that's then decoded to something broken
+        like "C├Г┬йdric" or "CÃ©dric". See Bug #569460 at bgo.
 
 Metadata:
       * Store all the operations we apply to an image in the image
