Error in Encoding - Photoset

Topics: Developer Forum
Jan 3, 2012 at 4:41 PM
Edited Jan 3, 2012 at 4:45 PM

I have the following statements in my website:


DataTable dataTable = new DataTable();
DataRow dataRow;

// definindo as colunas
dataTable.Columns.Add(new DataColumn("TipoItem", typeof(String)));
dataTable.Columns.Add(new DataColumn("AlbumId", typeof(String)));
dataTable.Columns.Add(new DataColumn("Titulo", typeof(String)));
dataTable.Columns.Add(new DataColumn("ArquivoFlickr_Small", typeof(String)));

Flickr flickr = new Flickr(apiKey, sharedSecret);

PhotosetCollection albums = flickr.PhotosetsGetList(userId);

foreach (Photoset album in albums)
    dataRow = dataTable.NewRow();
    dataRow["TipoItem"] = "ÁLBUM";
    dataRow["AlbumId"] = album.PhotosetId;
    dataRow["Titulo"] = album.Title;
    dataRow["ArquivoFlickr_Small"] = String.Format("http://farm{0}{1}/{2}_{3}_m.jpg", album.Farm, album.Server, album.PrimaryPhotoId, album.Secret);

In Flickr, the album title is "Sítio em Arujá - 14/08/2011", but it returns "Sítio em Arujá - 14/08/2011" in album.Title statement. Probably is the encoding, but I don't know how to fix this.

Can you help me?


Rodrigo Zanfa.

Jan 4, 2012 at 7:28 AM

Thank you. I have changed the encoding to UTF8 and it has fixed this issue. It is now in the latest source code.

Jan 4, 2012 at 9:41 AM

Where is the new DLL's download file?

Jan 4, 2012 at 9:43 AM

I haven't compiled the new DLL yet, I'll try to get around to that soon. In the mean time you could download the source code if you wanted.