This project has moved and is read-only. For the latest updates, please go here.

Searches with accents (diacritics) fail

Feb 16, 2010 at 12:18 AM

I'm using the PhotosSearch() method to return images of cars which works a treat until you come across a car name that has letters that have accents (diacritics). e.g.  Lamborghini Reventón or Citroën DS

Searching on the Flickr website for those cars (or hitting the search URL directly) returns heaps of photos but when I attempt to retrieve photos using PhotosSearch() I get almost nothing.

This is an abbreviated version of my code (the model name is retrieved from the database, otherwise it's identical). I get the same results whether I use options.Text or options.Tags:

var flickr = new Flickr(ConfigurationManager.AppSettings["FlickrApiKey"]);
var options = new PhotoSearchOptions();
options.TagMode = FlickrNet.TagMode.AllTags;
options.Text = "Lamborghini Reventón";
var photos = flickr.PhotosSearch(options);

The only image this search returns for me is this: ... it has the word Reventón in the description.

I've run the model names through a method to replace diacritics with  (e.g. Lamborghini Revent%C3%B3n) but I still get the same results.

Am I missing something here?

Feb 16, 2010 at 12:22 AM

OK, I just ran that exact code up there and it WORKED goddammit! Please ignore the above post. :(


Feb 16, 2010 at 12:38 PM

OK, thanks for letting me know.